Checking if a string is null

Bruno Medeiros brunodomedeiros+spam at com.gmail
Thu Jul 26 10:59:18 PDT 2007


Oskar Linde wrote:
> Manfred Nowak wrote:
> 
>> This is a hack to avoid some overhead in some places, but may 
>> introduce  more overhead in other places.
> 
> This entire discussion is trying to make todays T[] -- a slice type with 
> value semantics and some provisions for making it behave as an array in 
> some cases -- into a pure array type with a well defined null. You can't 
> do that without breaking its slice semantics. A much better suggestion 
> is Walter's T[new]. Make T[] remain the slice type it is today and make 
> a distinct array type (preferably a by-reference type).
> 

Today's T[] is "a slice type with value semantics and some provisions 
for making it behave as an array in some cases"? Whoa. What do you mean 
"making it behave as an array in some cases" ? What's the difference 
between a slice type and an array? And why would having null arrays in D 
break its slice semantics?


-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D


More information about the Digitalmars-d-learn mailing list