From: Caleb Clausen Date: 2010-02-15T18:24:03+09:00 Subject: Re: "Code must be Chunkable" On 2/12/10, Jörg W Mittag wrote: > Unfortunately, for this dynamic role injection stuff, we run into one > of the (very few) limitations of Ruby. We cannot just, as Trygve says, > "subclass the compiler" and "add to and delete methods from the method > dictionary" in Ruby (although we probably *can* in Rubinius) like > Trygve's Squeak implementation does or subvert the compiler like > James's C++ template metaprogramming implementation does. When people say things like this, it makes me think there ought to be a way to do it by using RubyMacros. So, I tried to rewrite Tom/Brian's code as macros... I think I can get rid of the need to call extend or use method_missing/proxies. But I had to use a feature of RubyMacros that I haven't invented yet (motivation!) and I may be missing the point (esp as I didn't watch the movie). Since I don't know if it would even work, I'm reluctant to post the example I came up with,,, but if anyone really wants to see it, I will.