Linked by Owen Anderson on Mon 19th Apr 2004 05:43 UTC
General Development For years the development scene has been dominated by the C family of languages, primarily C itself and its immediate successor C++. Recent years have given rise to other C-descendents, however, such as Sun's Java and Microsoft's C#.
Permalink for comment
To read all comments associated with this story, please click here.
RE: empty strings
by Owen Anderson on Mon 19th Apr 2004 13:45 UTC

Ouch! There is a very big difference between "nothing/unspecified" and "a string with the length 0". Trying to make these equivalent is just stupid, and it _will_ come back and haunt you.

You're right. Assuming the underlying structure of the string isn't a great plan. However, D strings, because they are just arrays of chars, know their own length. Hence you don't need to and probably shouldn't rely on the null byte to mark the end.