From: "trans. (T. Onoma)" Date: 2005-01-16T22:58:19+09:00 Subject: Re: Fwd: [suby-ruby] Your all time desired fundemental Ruby mod On Sunday 16 January 2005 07:35 am, David A. Black wrote: | Hi -- | | On Sun, 16 Jan 2005, trans. (T. Onoma) wrote: | > I'm taking a little poll. | > | > Let say you're Matz, but without any of the pressures of keeping up with | > a previous version of Ruby. What one thing above all others would you | > like to see differ about Ruby? | | I would be happy to see class variables (@@var) disappear. But I | don't like the idea of class_attr_reader and things like that. Just | use the existing attr_* methods, which Class objects already have just | as much access to as other objects. If a Class object needs its own | state, let it keep its own state. If it wants other objects to have | access to it, let it give them access. But @@vars cut upwardly across the class hierarchy, which is a bit different. Is that right? Please correct me if I'm wrong. | Hand-in-hand with this, and for other reasons, I would like my | Kernel#singleton_class RCR to be accepted :-) I think that would make | the whole singleton-class model enormously easier to explain and | grasp. Unfortunately it's still surrounded by a kind of mystique and | mystery for many people -- which is really too bad, since it's | actually so simple and transparent and cool. Ruby Facets offer all of these BTW: require 'facet/class/cattr' gives you #cattr_reader, #cattr_writer and #cattr_accessor. And require 'facet/object/special_class' provides #singleton_class (alias of #special_class). T.