From: "T. Onoma" Date: 2004-08-23T23:14:02+09:00 Subject: Re: Callback for instance var creation? On Monday 23 August 2004 04:30 am, Robert Klemme wrote: > "T. Onoma" schrieb im Newsbeitrag > news:200408230415.32703.transami@runbox.com... > > > On Monday 23 August 2004 03:41 am, Robert Klemme wrote: > Personally I don't like at all introducing a constant for each method in a > class. Plus, methods are not constant i.e. you can redefine them. That what everybody says! (Because of the namespace pollution, I guess.) On the later point, constants in Ruby aren't necessarily so constant. Constants can be hashes or arrays and their internal contents can readily change too --and that's useful. > What kind of state do you want to attach to methods? I mean, what problem > are you trying to solve? AOP. In AOP advice wrap methods, so if methods have state, then wrapping can be dependent on that state (like arity). On the other hand, just having a clean syntax for accessing them is nice too. I still like ::ameth, best. -- T.