new DIP5: Properties 2
Benji Smith
dlanguage at benjismith.net
Sat Aug 1 21:18:53 PDT 2009
Bill Baxter wrote:
> On Fri, Jul 31, 2009 at 10:09 PM, Andrei
> Alexandrescu<SeeWebsiteForEmail at erdani.org> wrote:
>> Benji Smith wrote:
>>> So the clusterfuck of unenforceable and useless conventions is already
>>> here. Here's my suggestions: if you think putting parentheses on a no-arg
>>> function is stupid, then it should be a syntax error for them to exist. That
>>> wouldn't be my first choice, but it'd be a thousand times better than the
>>> situation with optional parens.
>>>
>>> --benji
>> I agree that it's not good to have two ways of doing the same thing. Now
>> think of it for a second: a full-blown language feature has been proposed to
>> not fix that, but reify it.
D already has a *truckload* of such features. Aliases, typedefs, renamed
imports, and overloaded operators all exists solely so that a programmer
can pretend that one thing is another thing, so that an API designer can
more precisely express the *intent* of the code, and with semantics that
are enforced by the compiler.
Compared with those other features, I don't see what's so different
about the properties proposals.
--benji
More information about the Digitalmars-d
mailing list