Properties

bearophile bearophileHUGS at lycos.com
Fri Jan 9 17:55:53 PST 2009


Nick Sabalausky:
> In any case, whenever I see "mixin(...);", even in my own code, I always 
> think "hack". That's fine for obscure special-domain tools, but for 
> something as common and as general as properties, it just comes across as a 
> big kludge.

I agree. String mixin are generally near-unreadable, and I hate to debug them. So it's better to use them as little as possible.
If many D programs show a very common pattern (like certain usages of properties) it becomes a candidate to be included into the compiler and not done with string mixings anymore.
(This also means you can see string mixings as feature laboratories: that is tests of features that may be added to future versions of the language. Just like plugins in Firefox).

Bye,
bearophile



More information about the Digitalmars-d mailing list