Empty VS null array?
Blake Anderton
rbanderton at gmail.com
Fri Oct 18 13:09:35 PDT 2013
I agree a null value and empty array are separate concepts, but
from my very anecdotal/non rigorous point of view I really
appreciate D's ability to treat them as equivalent.
My day job mostly involves C# and array code almost always
follows the pattern if(arr == null || arr.Length == 0) ...
In D just doing if(arr.length) feels much nicer and less error
prone. I'm all for correctness but would hate to throw the baby
out with the bathwater.
More information about the Digitalmars-d
mailing list