[Issue 1323] Implement opIn_r for arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 9 08:39:10 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1323


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com




------- Comment #1 from smjg at iname.com  2007-07-09 10:39 -------
It's been said before, no harm in repeating it here.

For associative arrays,

        X in A

means that there exists a Y for which

        A[X] == Y

According to the semantics that get proposed every time this is brought up, for
linear arrays, it would mean the reverse: there exists a Y for which

        A[Y] == X

This inconsistency might be undesirable from a generic programming POV.

Besides, if we're going to have an operator to check whether a specified
_value_ is in an array, shouldn't it be available for AAs as well?


-- 



More information about the Digitalmars-d-bugs mailing list