On Wed, Sep 22, 2010 at 1:48 AM, Yusuke ENDOH <mame / tsg.ne.jp> wrote: >> >> Maybe if there is only one element to the right of "in", >> ¨Βσθουμδ βε γθεγλειζ θαφιξη αξ £ιξγμυδενετθοδ αξτθεξ γαμμ ιτ >> (or check if it is Enumerable) > > Hmm. ¨Β ςεγειφεδ τθσινιμαοπιξιο¨φια Καπαξεσε τχιττες©> I think that that makes the semantics complex (for me), but it is ok > as long as the behavior of usual cases is intuitive. > I also like the "x in foo" infix syntax. I would expect it to be a membership test, for example in the following situations: an_arr = [11,22,33] a_set = Set.new([11,22,33]) p (10 in an_arr) # false p (11 in an_arr) # true p (10 in a_set) # false p (11 in a_set) # true and probably similarly for other "collection type objects" too (I believe it works something like that in Python). Regards, /Johan Holmberg