March 31, 2003 Re: 'new' syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to factory | "factory" <tehdasX@optushome.com.au> wrote in message news:MPG.18eaac936b6e48b98968a@news.digitalmars.com... > And one does not have to demand that a shorter form of the syntax has > to be used.. > > A x; // x is uninitialized > A x1(); // x1 is one instance of A > A x2= new B; // x2 is one instance of B The problem with the A x1(); syntax is it is syntactically ambiguous with a function declaration. |
Copyright © 1999-2021 by the D Language Foundation