From: "Hal E. Fulton" Date: 2001-05-29T07:21:45+09:00 Subject: [ruby-talk:15897] Re: Experimental "in" operator for collections Hi Stefan, I've been in favor of an "in" operator for awhile... although better minds than mine are hesitant about it. More comments below... ----- Original Message ----- From: Stefan Matthias Aust To: ruby-talk ML ; Sent: Monday, May 28, 2001 5:40 AM Subject: [ruby-talk:15863] Experimental "in" operator for collections > There's one thing where I prefer Python over Ruby. Testing whether an > object is included in some collection happens so often, that a special > syntax just looks better. > > Just to test how Ruby would feel like, I modified the system to allow > > object in array I agree with this. Actually, the way I would do it is not to assume that it's an array. I would say, let it be any object that responds to the include? message. > and > > object not in array This I disagree with. There's no other operator in Ruby that lets you interpose a "not" in such a way. I'd much rather do it the traditional way: not object in array Actually, the longer I think about this second issue, the more strongly I feel about it. It gives me bad memories of REXX... Hal