[:] as empty associative array literal, plus warning for null

Timon Gehr timon.gehr at gmx.ch
Thu Jul 4 08:27:15 PDT 2013


On 07/04/2013 04:35 PM, Andrei Alexandrescu wrote:
> On 7/4/13 6:32 AM, Steven Schveighoffer wrote:
>> I would not be opposed to a pull request that made [] be non-null, as
>> long as it doesn't allocate.
>
> What would be the benefits?
>
> Andrei

- Additional sentinel values at basically no cost.

- No accidental flawed relying on empty array is null or empty array !is 
null.
   (i.e. less nondeterminism.)

- One thing less to discuss (this has come up before.)



More information about the Digitalmars-d mailing list