Properties

dsimcha dsimcha at yahoo.com
Fri Jan 9 07:34:12 PST 2009


== Quote from Daniel Keep (daniel.keep.lists at gmail.com)'s article
> Why change the language when you can just abuse it's already-existing
> features? :D
>    -- Daniel "downs is my hero"

This is precisely the attitude that left C++ with all of the cruft and baggage it
has.  Yes, if something can be implemented *elegantly, efficiently, and with clean
syntax* in a library, then it doesn't belong in the core language.  Yes, powerful
language features like templates, mixins, operator overloading, etc. are great for
abusing when you need something that's not universal enough to be in the core
language.

The flip side is that, the more you rely on libraries (whether your personal
snippet library or an "official" library) that use hacks like this, the more
you're building a house of cards.  When you build hacks on top of other hacks, and
build these on top of still more hacks (think STL), you're basically asking ugly
syntax, odd corner cases, and the exposure of obscure implementation bugs.  This
is why things like arrays, strings and delegates belong in the core language.
Since properties are just as universal, I believe the same argument can be made
for them.



More information about the Digitalmars-d mailing list