boolean over multiple variables

Nick Sabalausky a at a.a
Tue Jan 26 12:27:13 PST 2010


"Pelle Månsson" <pelle.mansson at gmail.com> wrote in message 
news:hjmmod$1iok$1 at digitalmars.com...
>
> I think in should work for keys in an associative array and for values in 
> a regular array.
>
> This is how it works in python.

Aside from that being how Python does it, why do you see that as preferable? 
I see both arrays and associative arrays as things that map an input value 
to an output value. The only significant differences are the implementation 
details, and the fact that regular arrays are more restrictive in their sets 
of valid inputs (must be integers, must start with 0, and must all be 
consecutive values). So having a single syntax work on the outputs for 
regular arrays, but then on the inputs for AAs, seems highly inconsistent 
and error-prone to me.




More information about the Digitalmars-d-learn mailing list