Properties sugestion.
Chad J
gamerChad at _spamIsBad_gmail.com
Mon Aug 20 15:36:32 PDT 2007
OK well the template solution might be a nice hack to get by for now, it
has some unfortunate shortcomings:
-----
"Future Directions
The operators !, ., &&, ||, ?:, and a few others will likely never be
overloadable. "
Too bad for boolean properties. opDot might be on that list too.
-----
The template solutions provided by Ender KaShae and Christopher Wright
both need runtime intervention. They will also likely result in excess
memory usage, which is a minor optimization issue.
Without some kind of runtime initializer for variables like C# has, this
also means polluting constructors and the like with property
initialization.
-----
They only take delegates. This leaves out free functions and static
methods. It might be fixable with more potent template magic though.
-----
Onwards to Python and Delphi suggestions...
More information about the Digitalmars-d
mailing list