From: nobu.nokada@... Date: 2004-04-15T12:12:02+09:00 Subject: Re: Comments on Ruby Hi, At Thu, 15 Apr 2004 03:24:16 +0900, Bill Atkins wrote in [ruby-talk:97173]: > 1. def ought to return a Method object. Just because. Having def > return an object adds a little bit of consistency, IMO. Method object is not method itself, rather a wrapper for it, whereas Class is the class itself. I feel Symbol would be enough. > 2. Top-level defs should be singleton methods in an Object instance > dedicated to that file. It's messy that a top-level def can be called > on any object. If you feel so, don't use top-level methods, define in meta class. class << self def foo end end Methods need to be visible everywhere would be top-level. > 3. The pipes on a parameter list for a do block ought to be optional. > I'm not sure about this one. By "pipes", do you mean this? foo do |this| end Then, it's optional, you can omit it if you don't use it. > 4. caller should provide the sender of the current message. Particular method instead of parsing strings? > 5. All special $ variables out to be deprecated or even removed. It will. > 6. There ought to be some way to assign to a receiver object, or > overload = or something. Assignment is not an operation on an object. > 7. Perhaps some kind of site-level initialization file in > lib/site_ruby that would be called before any script is loaded to add > methods to the default classes. Use RUBYOPT environment variable. -- Nobu Nakada