[Issue 4475] Improving the compiler 'in' associative array can return just a bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 7 06:28:43 PST 2012


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


Alex Rønne Petersen <xtzgzorex at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xtzgzorex at gmail.com


--- Comment #4 from Alex Rønne Petersen <xtzgzorex at gmail.com> 2012-01-07 06:28:41 PST ---
I would be against making 'in' return bool for AAs. I often do:

if (auto x = foo in someAA)
    // do something with *x

Doing a lookup after checking for foo's presence in someAA is ugly compared to
this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list