Metaprogramming Javascript
March 28th, 2007Within a couple of weeks of almost getting my head around Ruby meta-classes, here’s a link to an interesting presentation on metaprogramming Javascript (in PDF format) by Adam McCrea. I’m not completely convinced that
show("brutus").when("us-state").is("Ohio,Michigan")
really qualifies as a DSL - reminiscent of Prototype’s somewhat cheesy Try.these() - but it’s a pretty mean feat of coding nonetheless.