Austin Ziegler wrote: > On 5/19/06, Alex Young <alex / blackkettle.org> wrote: <snip> >> A possible solution sprung to mind: how does the following syntax look? >> >> require 'foo', :into => 'Bar' >> require 'qux', :into => 'Wibble::Spang' > > Awful and unworkable. Really? There's already been one implementation posted that could support exactly this. Is it the concept you object to, or how it looks in this case? Would you prefer the: module Bar import('foo') end syntax that was also suggested? Or maybe require 'foo', Bar ? > Remember that in Ruby, a filename does not > necessarily correspond to a created or loaded class. I'm not assuming that. I'm just supplying a module context within which arbitrary code can be imported and executed. I'd want this system to be circumventable too, by the way - as long as the author knew they were doing it. > Furthermore, with > dynamic code generation, that would end up meaning nothing at all in > the end. This is where it gets interesting. Can you give me an example? > So, I would oppose this heartily. Fair enough :-) Bear in mind, though, that this offers a way to fix a current problem without breaking anything. -- Alex