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

Diggory diggsey at googlemail.com
Wed Jul 3 11:15:19 PDT 2013


I agree - the current state with both null and non-null empty 
arrays is confusing, and the separate syntax for empty arrays and 
associative arrays is nice and consistent.

I would go as far as to say it should be impossible, or at least 
fairly difficult in safe code to distinguish (both intentionally 
and unintentionally) between an array of size zero with a 
non-null pointer and an array of size zero with a null pointer, 
and similar for associative arrays too.


More information about the Digitalmars-d mailing list