I'm trying to get the zen of building DSLs using Ruby. After reading a dozen or so pieces referenced by my favorite search engine, I have a feeling I'm still not quite getting it.
I grok the various forms of eval (eval, module_eval and instance_eval) as well as the extremely cool Binding feature.
I've also seen
BlankSlate for eviscerating an object of the methods it picks up from Object.
At the end of the day, however, it looks like the whole Ruby/DSL thing is just inventive use of eval + some clever string munging, both of which are pretty doable in Javascript or Python (or even (gasp) C# using the CodeDOM compiler).
I'd love nothing more than for the Ruby folks to point me in the right direction.
I met someone at the MS Tech Summit last month who's writing a book on this - perhaps he reads my blog and will give me the clue(s) I need.
Posted
May 07 2006, 02:35 AM
by
don-box