From: Roger Pack Date: 2007-10-17T22:45:51+09:00 Subject: Re: ruby wish-list Ari Brown wrote: > Hey! > > Not **quite** on topic of garbage collection.... But how hard would > it be to create maybe a style of method creation that doesn't use > the . to represent Object.behavior ? Define your code in the global namespace, like def a end is a function a 'in the global namespace' -- no dots. Maybe hard code in the parent class? The way Rails does it is by say you do the command my_special_class_function_one if it doesn't exist it catches the error thrown for non-existence, looks up how and then defines the method and returns it (redefines things in-line). > > In retrospect, it seems like definitely a core language feature that > may or may not be impossible to get at... But I figured I'd ask :-) > > > Also, Is there an easy/hard way to define new %{} style methods? Like > for a Rope object, maybe %m{} or something. Not sure. GL! > > Just a newbie's musings. > > Thanks, > Ari > --------------------------------------------| > If you're not living on the edge, > then you're just wasting space. -- Posted via http://www.ruby-forum.com/.