String Theory Questions
Kagamin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 14 02:07:25 PDT 2014
On Sunday, 14 September 2014 at 00:34:56 UTC, WhatMeWorry wrote:
> So is one form (Empty strings versus null strings) considered
> better than the other? Or does it depend on the context?
For all practical purposes they should be equivalent in D code. I
suppose the distinction exists because somebody claimed he can
make sense of it. Some API may rely on distinction between null
and empty string, like XML DOM, though I don't think such
interface is very useful.
Also for some reason boolean value of a string is derived from
ptr instead of length... meh.
More information about the Digitalmars-d-learn
mailing list