On Sun, Jun 6, 2010 at 9:00 PM, Rein Henrichs <reinh / reinh.com> wrote:>
> I hope that other Rubyists that may stumble upon this thread will take
> Robert's FUD with a grain of salt and will feel free to determine the
> usefulness and any potential dangers of implementing #eql? and #hash --
> along with other Ruby idioms like #each (for Enumerable) and #<=> (for
> Comparable) -- on their own. An ounce of critical thinking is better than a
> pound of dogma.
>

Let me be clear, People of the Future: implement eql?, ===, and hash
on your own classes as appropriate. Doing so is the proper way to
allow your code to interact with other libraries and coders. Even if
your code lives in isolation, ensuring proper semantics via these
methods prevents a class of tricky bug that your successors may have
to deal with.