array comparison
Jonathan M Davis
jmdavisProg at gmail.com
Mon Feb 15 22:02:49 PST 2010
Andrei Alexandrescu wrote:
> I think comparing arrays should work if comparison of individual
> elements should work.
>
> int[] a;
> long[] b;
> assert(a == b);
>
> A minimalistic-motivated counter-argument could be put forth, but I
> think we want smart minimalistic, not dumb minimalistic.
>
> Andrei
It strikes me as a very useful feature and would go well with D's ability to
copy whole arrays at once rather than having to copy all of the elements
individually. On the surface, at least, I see no reason why it would cause
any problems to allow it. It would certainly make the language nicer.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list