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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 17 12:02:30 PST 2010


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



--- Comment #5 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> 2010-11-17 12:01:15 PST ---
> Here I don't care if for 'null' is easier to parse by the compiler. Here I care
> more for the programmer and the semantics in his/her head.

Programmer has a parser too.

> I don't understand what you mean. In that context [ ] are delimiters for a
> particular kind of built-in collection.

Depending on the context, [] can have 3 meanings only one of them is value.
Meaning of null is context-independent.
If you care about semantics in one's head, here are some details: [] can have
non-null .ptr, because it's an array literal and array is usually located
somewhere in memory, ptr pointing at its beginning, so ([] is null) can be
false.

-- 
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