[Issue 3889] Forbid null as representation of empty dynamic array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 16 21:31:58 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3889



--- Comment #3 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> 2010-11-16 21:30:44 PST ---
>     foo(null);
>     foo([]);
>
>     // OK, int[]
>     foo(cast(int[])null);
> 
>     // OK, int[]
>     foo(cast(int[])[]);
> 
>     // Partially OK, inside foo 'a' is of type void[]
>     foo([]);

I think, null is easier to parse.
null is a handy visual anchor, but [] doesn't even look like a value, one
should spend some effort to recognize it as a value.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list