Checking if a string is null
Manfred Nowak
svv1999 at hotmail.com
Sat Jul 28 22:36:46 PDT 2007
Bruno Medeiros wrote
> (What made you do that in the first place?)
Because arrays should approximately form a mathematical Kleene Algebra
at the semantical level. These have two different neutral elements 0
and 1, so that concatenation and 1 are required to form a monoid.
> However at the semantic level, they *are* the same abstract objects
> (which is what opEquals checks)
And in D definitions as well as implementations check the neutral
elements 0 and 1 for arrays at least sometimes to be equal.
> Yes, "there is no identity preserving element for arrays under the
> concatenation operation", and that's really no problem whatsoever.
> (Do you even know of a non-value type that has identity preserving
> element with regards to any operation?)
This probably will boil up by the missing definition for an equivalence
relation on types, which defines one equivalence class that holds all
the "non-value type"s.
-manfred
More information about the Digitalmars-d
mailing list