From: "jonathan " Date: 2005-12-08T15:46:51+09:00 Subject: Re: injecting dynamic methods into a class gwtmp01 wrote: > On Dec 7, 2005, at 9:22 PM, jonathan wrote: >> Having many terms for the same thing isn't necessarily a bad >> thing. It >> happens in every other aspect of programming as well (class methods >> are >> called 'member functions', 'methods', 'member methods', etc.). > > Yes but we don't have Class#member, Class#method, Class#member_method, > Class#attribute, and Class#feature, etc. in Ruby. We have > Class#method and > that all by itself probably forces a canonical term for the concept. > Ahh. Ok. I think I also gathered from other posts that it also helps to be able to differentiate these for the purpose of error messages. Well, this may be a solution: Let the type of singleton which implements the singleton design pattern remain as a 'singleton' in error messaging and introspection. But, let the class which is a singleton by having nothing but class methods be known as a simpleton. In essence, from the outside, they look the same (and please correct me if I'm wrong because I don't know all the Ruby syntax yet, but in essence I think they are the same). Simpleton and singleton are synonyms as far as I know. And, these two ways of arriving at a singleton produce the same effect for the consumer (but differentiating them is nice for error messaging and introspection). --Jonathan -- Posted via http://www.ruby-forum.com/.