Is alias equality inconsistent?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri May 13 16:22:59 PDT 2011
On 5/13/11 5:00 PM, Timon Gehr wrote:
> Fixed-size arrays are somewhat special, there 'is' actually compares ptr and
> length. I think that is very practical and makes sense because it allows
> meaningful 'is' between fixed- and dynamic-size arrays. I guess for value types it
> is there for completeness and maybe to enable easier generic programming. We do
> not lose anything by having it.
I think 'is' for static arrays could go either way. If they're to be
seen as an equivalent of structs, is should yield true. If they're to be
seen as a close relative of dynamic arrays, is should yield false.
Probably it would be best to disable it :o).
Andrei
More information about the Digitalmars-d
mailing list