boolean over multiple variables

Simen kjaeraas simen.kjaras at gmail.com
Mon Jan 25 09:09:37 PST 2010


Pelle Månsson <pelle.mansson at gmail.com> wrote:

> Interesting solution! Very clever!

Thank you.

> I still think opIn_r should be defined for arrays, though. :)

Yeah, but currently, 'a in b' means '(∃b[a])', that is,
'is a a valid index in b'.
This means having 'a in b' mean '(∃i)( b[i] = a )', that is,
'is there such an i that b[i] == a' would introduce
inconsistencies.

While I do agree it would, I do see reasons for including such
a thing to the language, especially seeing how often just that
question arises, and how rarely the first meaning is actually
useful.

-- 
Simen


More information about the Digitalmars-d-learn mailing list