April 20, 2004 auto construction syntax | ||||
|---|---|---|---|---|
| ||||
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?
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply