News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood by koenigdavidmj on Saturday May 10, 2014 @03:34AM (#7724770)
The #equal? method does your object_id comparison, by the way.

Ruby's default #== for new classes simply performs identity comparison, just like in Java. The difference is that Ruby has operator overloading, so all the builtin classes overload it with something sensible.

(This could work in Java, or it could go the .NET route and ban using the == operator entirely until a certain interface (.NET's IEquatable) is fulfilled.)

There are no comments on this comment yet.