[:] as empty associative array literal, plus warning for null
Regan Heath
regan at netmail.co.nz
Thu Jul 4 05:53:42 PDT 2013
On Thu, 04 Jul 2013 13:41:48 +0100, Timon Gehr <timon.gehr at gmx.ch> wrote:
> On 07/04/2013 11:25 AM, Regan Heath wrote:
>> ...
>>
>> Tommi's suggestion that all empty arrays share a common pointer is a
>> good one and more or less solves the "it has to allocate memory"
>> complaint.
>> ...
>
> (That was actually my suggestion. :o) )
Whoops :P
> Sharing a common pointer has some drawbacks as well, because it still
> makes [] somewhat special. It is probably worth it though.
True, it may require some special casing in the array code on mutations of
the array etc.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list