new initializer syntax (was TempAlloc review starts now)

bearophile bearophileHUGS at lycos.com
Sun Jun 5 18:34:26 PDT 2011


Andrej Mitrovic:

> Why pass a new heap-allocated array which
> you don't have the handle to outside of foo? What's the use-case for
> this example?

It's a minimal example to show a syntax, it's not an use case.


> No need to mess with the compiler,

With this attitude probably you are able to remove half of the stuff present in D today (and sometimes this is good. After all this time I have changed my mind a little and I don't think associative arrays are so good as built-in in a system language. What's needed is just a general built-in syntax to define AA literals, a syntax usable for user-defined types too).

Bye,
bearophile


More information about the Digitalmars-d mailing list