From: Christian Neukirchen Date: 2005-05-29T23:15:34+09:00 Subject: Re: Useless hack of the saturday morning gabriele renzi writes: > Christian Neukirchen ha scritto: > >> That's very nice and useful (I often wished for it), but goo already >> had it for a long time. :-) It is called "packing" there, see >> http://people.csail.mit.edu/jrb/goo/manual.46/goomanual_29.html > > wow, I always thought GOO was cool, it seem I need to investigate it > more deeply :) If it was alive, it would be even nicer... so many good ideas but noone pushing them. >> I think the implementation with instance_eval can be a bit surprising, >> maybe [Dynamic Variables][1] could do that better. > > yup, instance_eval is an hack, but I liked the idea of just allowing > #take inside #gather, which I don't have Idea how to reproduce > withouth it. Using DynaVars seem definitely a cool hack, anyway :) I'd just make it raise a RuntimeError if you're not inside a gathering. Esp. in method definitions, how would you reach for "the outer self"? -- Christian Neukirchen http://chneukirchen.org