On Fri, Aug 29, 2008 at 8:40 PM, Doug Glidden <41mortimer / gmail.com> wrote: > Robert Dober wrote: > [snip] >> Seriously #is_a? is more readable for sure but #=== has the advantage >> to pinpoint the possibility of using a *case* statement. >> >> Cheers >> Robert > > OT: > > All true, but also consider the fact that === requires one to remember > what it means (=== vs. ==), which is not particularly intuitive (as > opposed to is_a?, which is a term most students get drilled into their > heads pretty much the first day of their first OO programming course). > The confusion is further compounded by the fact that (if I remember my > JS correctly) the functionality of === and == in Ruby are exactly > reversed from their functionality in JavaScript. I believe that because of the case statement semantics it is necessary to take the === bull by its horns relatively early. The "I do not understand case" is a recurring theme after all :( BTW I did not know about the JS === semantics, most unfortunate that they are opposed. R.