From: Johann Hibschman Date: 2000-06-20T10:10:09-07:00 Subject: [ruby-talk:03564] Re: function objects? Yukihiro Matsumoto writes: > |Also, why require "obj.method(:function)" rather than having > |"obj.method" itself return a bound method object, as is the case in > |Python? Is there something in the Ruby grammar that would make it > |awkward, is it a consequence of making everything an object that I > |don't see yet, or is it something else entirely? > Because I choose `obj.method' as alias of `obj.method()'. Ah, thanks. That makes sense. > Methods without argument is much frequently used than retrieving > method object. In addition, it allows much room for method > optimization, which is very important for performance of an > object-oriented language. I'm afraid I don't understand how this would affect things. But that's another story. I have to play with Ruby a bit more before I start trying to understand how its design choices affect optimization. Cheers, --Johann -- Johann Hibschman johann@physics.berkeley.edu