From: Dan Schmidt Date: 2000-09-29T00:10:02+09:00 Subject: [ruby-talk:5176] Re: Types and === matz@zetabits.com (Yukihiro Matsumoto) writes: | "Hal E. Fulton" writes: | | |However, I'm still puzzled by two things: | |1. Why do we say "case other; when receiver" and not | |"case receiver; when other"? | | I felt the case behavior should be determined by objects listed | after `when', not by a `case' object. That is the reason that I assumed when I first found that the objects in === were reversed from what I had expected. I guess for the best solution to the case-matching problem one needs multimethods. | |2. Why is the argument order for pattern === string opposite | |from the order for string =~ pattern? | | It's for historical reason (since AWK and Perl work so), but I | recommend `pattern =~ string' order in Ruby. People might be interested in seeing a possible direction that =~ is headed in in Perl 6: http://dev.perl.org/rfc/164.html http://dev.perl.org/rfc/170.html Of course, these are only proposals at this point. -- Dan Schmidt | http://www.dfan.org Honest Bob CD now available! | http://www.dfan.org/honestbob/cd.html