Metaprogramming Linkage
Wednesday, March 21, 2007
Here are some great resources to follow up on my presentation:
Dan Webb’s presentation on metaprogramming JavaScript can be found at the bottom of this post. A bit different approach than I took, but very cool stuff.
David Black discusses the unnecessary distinction between “programming” and “metaprogramming”. I couldn’t agree more.
In this edition of the Ruby on Rails Podcast, Geoffrey Grosenbach discusses metaprogramming with Glenn Vanderburg. This was actually the first time I had ever heard the term, back when it was “big and scary”. Glenn put it into terms that really made sense, and got me interested in exploring the concepts in my day-to-day work.
Russ Olsen walks through a two-part series on building a DSL in Ruby.
Jay Fields discusses various evaluation options in Ruby, which can be very helpful when building a DSL.
programame.net 22-Mar-07 at 6:04 am
Metaprogramación con JavaScript…
Este artículo presenta la manera de utilizar los conceptos de metaprogramación aplicados al lenguaje JavaScript para realizar tareas complejas y repetitivas….
Jeremy D. Miller -- The Shade Tree Developer 26-Mar-07 at 1:46 pm
Metaprogramming with JavaScript…
JavaScript, even more so than VB, has to be the Rodney Dangerfield of programming languages. I'm…
Jean Rajotte 27-Mar-07 at 11:56 am
Adam,
lovely, lovely presentation. Crisp, interesting, funny, enlightening.
Why do you say “Don’t fear eval”. You use eval only once, in your code, to create functions via Template. Couldn’t you have just created the functions w/ closures and not use eval. Why not fear eval? Isn’t it switching execution context to the top, which isn’t as economic and possibly breaking of encapsulation?
I fear eval.
adam 27-Mar-07 at 1:17 pm
Jean -
Okay, I’m sold. You’re the second person to point out that I can easily use a closure for what I’m trying to accomplish. When I post the tutorial, I’m most likely going to refactor that bit of code to use a closure. I’m honestly not sure why I didn’t take that route to begin with. Thanks for calling me out on it.
I still don’t fear the eval, though. I just think it should only be used when necessary, and with the knowledge that it will impact performance.