From: Mathieu Bouchard Date: 2002-01-21T04:08:40+09:00 Subject: Re: dynamic method creation On Sat, 19 Jan 2002, Dan Sugalski wrote: > At 6:19 AM +0900 1/19/02, Leo wrote: > >"Albert L. Wagner" writes: > > > >> I have a need to dynamically create methods with method names > >> that are not known until run time. Below is my current best > >> shot. Is there a better way? If methods allowed expressions as > >> names, and not just as qualifiers, I wouldn't need the eval. > > > >You just asked for lisp/scheme type macros. This issue has come on this list > >several times in the past. Everybody understands how great it would be to have > >Ruby macros. It will clearly sky rocket Ruby past Perl/Pyhon. > > Dunno about python, but there's nothing new about this for perl. > Dynamic class and method creation's pretty straightforward, and has > been for ages. Write how you do this in Perl without using eval. You can do it with eval in Ruby, but the original posters would like something that uses not eval (not sure why). ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju