From: matz@... (Yukihiro Matsumoto) Date: 2001-11-24T22:49:48+09:00 Subject: [ruby-talk:26321] Re: String#== : Why not error with different type? Hi, In message "[ruby-talk:26298] Re: String#== : Why not error with different type?" on 01/11/24, Ryo Furue writes: |Then, the problem is: What is the most "natural" (intuitive) |definition of '==' ? I'd like to argue that most programmers think |(or "feel") they are comparing "values" in their mindset when they say |'=='; they don't (usually) think they are comparing values *and* |types. Ah, this is the point. In dynamic way of thinking, objects are values. You don't have to separate type and values. You don't have to think about types. Most Ruby programmers think they are comparing "objects" whether they are close enough. Introducing type checks too much may reduce flexibility of dynamic typed languages. Dave Thomas would talk you about "duck typing", maybe. matz.