Reddit: why aren't people using D?

Michiel Helvensteijn m.helvensteijn.remove at gmail.com
Fri Jul 24 12:26:58 PDT 2009


Walter Bright wrote:

> That's my problem with properties as a distinct syntax - they don't have
> distinct uses or behaviors.

You know, I don't believe I've seen you reply specifically to any of the
good points about D's properties people have been mentioning around here.

I believe the list I gave you in the 'big' subthread was fairly complete.
Would you please tell us what you think about each point? I'll repeat that
specific section of my reply here:

--------------------
> Why not? Seriously, what is the semantic difference?

There are many reasons. Some have been floating around this newsgroup this
very day.

* A reference to a function should mean exactly that: a reference to the
function, for use in functional programming. Instead, just the name of a
function now invokes a call.

* In D, &foo returns a function-pointer, but that means that D is context
sensitive, since its subexpression foo would return a property value. It is
confusing.

* What does D do if you have a property (p) that returns a delegate? Will
the call p() return the delegate? Or will it call the delegate?

* writefln = 5; This should just not be valid code. But it is.

* Real Properties have many advantages over what looks like D's ad-hoc
solution. They automatically document themselves as properties both to the
programmer and to IDE's (see some other posts from today). The programmer
may use them to overload certain operators and mutator functions that would
speed up the program. Months ago there was a big thread about Real
Properties. I myself offered a suggestion for their design. I don't
remember if you ever responded.

That's just a few reasons right there. D's properties lack elegance and they
lack potential.
--------------------

PS: I don't mean to gang up on you. You're just not making yourself clear on
where you stand on these points and why.

-- 
Michiel Helvensteijn




More information about the Digitalmars-d mailing list