in not working for arrays is silly, change my view

JN 666total at wp.pl
Sat Feb 29 19:38:09 UTC 2020


assert(1 in [1, 2, 3]);

Error: incompatible types for (1) in ([1, 2, 3]): int and int[

Yes, I know about .canFind(), but this is something that trips 
people over and over.

I think it would be better if "in" worked for both assoc arrays 
and normal arrays, or didn't work at all, for added consistency.


More information about the Digitalmars-d-learn mailing list