In Expression for Static and DYnamic Arrays
Rizo Isrof
mail at rizo.me
Thu Oct 11 10:45:36 PDT 2012
Hi,
Why the `in` expression can only be applied to associative
arrays and cannot be used with static or dynamic arrays as
it is possible with, _e.g._, Python?
The following code is not legal:
----
int[] a = [1,2,3,4,5];
if (1 in a) { }
----
Are there any technical explanation for this limitation?
Thanks, Rizo.
--
BF6F0265: FB27 BB4C 8F03 4980 C311 0968 E66B 9831 BF6F 0265
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20121011/b69f7669/attachment.html>
More information about the Digitalmars-d-learn
mailing list