Checking if a string is null
Manfred Nowak
svv1999 at hotmail.com
Fri Jul 27 00:18:36 PDT 2007
Bruno Medeiros wrote
> But first, explain me this, what do you mean the
> "identityExpression is restricted to arrays containing at least
> one element."? That doesn't seem to make sense.
In at least most definitions for relations on arrays in D the phrase
"all elements" is used.
Besides the fact that this phrase is informal its meaning seems to be
different from "for all x in the set S: P(x)". This latter phrase
clearly binds the predicate P to elements in existence.
Such existence quantor seems not to be included in the phrase "all
the elements are equal". This impressions is supported by this code
fragment:
writefln( "" is ""); // prints "false"
Note: maybe definition _and_ implementation are both buggy :-(
> That property "if `a is b' then `a == b'" holds for arrays with
> zero elements as well.
Maybe that the implementation is holding this property. But the
specifications does not mention it. Therefore this property might not
be intended and the implementation is waiting for a case where this
property does not hold.
-manfred
More information about the Digitalmars-d
mailing list