D - auto construction syntax
- Matthew (20/20) Apr 20 2004 This has been raised several times, but I want to raise it again.
This has been raised several times, but I want to raise it again. The proposed change is to allow auto objects to have a C++ auto object syntax, i.e. auto class Thing { public: this(SomethingElse se); ~this(); } int main() { SomethingElse se = ... ; auto Thing thing = new Thing(se); // current syntax auto Thing thing(se); // proposed syntax . . . Hopefully the advantages are obvious. It's easier to type, and helps to make it even clearer that auto objects are *not* on the heap. It doesn't cause parsing ambiguities (with possible func decls), since it is preceeded with auto. Votes / thoughts?
Apr 20 2004