Empty array literals
Don
nospam at nospam.com
Sun Mar 7 11:21:26 PST 2010
retard wrote:
> Sat, 06 Mar 2010 21:30:35 -0500, bearophile wrote:
>
>> In D null can also be used to represent an empty associative array. If
>> you think of AAs as instances of a class to be used by reference, then
>> using a null to represent an empty AA is meaningful (the main difference
>> is that you don't need "new" to allocate it at the beginning).
>
> The associative array is a sad type in D. It has nasty semantics. I'd
> like to see it as a real library defined type with just syntactic sugar
> for constructing literals. Too bad that's not what Walter thinks.
That IS what Walter thinks, actually. It's being moved to libraries
(which is why there have been some nasty AA regressions in the past few
compiler releases :-( ).
More information about the Digitalmars-d
mailing list