Clunky syntax

bearophile bearophileHUGS at lycos.com
Mon May 7 09:38:04 PDT 2012


ixid:

> Why is the new syntax so clunky?
>
> thing myThing = new thing;
>
> When it could be:
>
> new thing myThing;

Sometimes you want to write:

class Foo {}
class Bar : Foo {}
void main() {
    Foo b = new Bar;
}

Otherwise there is 'auto' too:

auto myThing = new thing;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list