On Eval
Giles Bowkett posted a snippet of Archaeopteryx code, and one line caught my eye: eval("@#{option} = attributes[:#{option}]"), because of the eval call.
In my opinion, calling eval is usually a code smell. Good support for reflection and metaprogramming in a language (and Ruby has both in spades) should obviate the need for eval - you should be able to write code to write code, not write the code and then cheat by asking the interpreter to run it for you. Ideally, your language would support first-class AST structures.
evaling strings of code also poses a problem for static analysis code tools - they just won’t see code embedded in strings. (I guess they could detect an eval call, and look at the argument, but I’m not aware of any tools that actually does this.) For example, I have Emacs run ruby -c (through flymake-mode) to make sure I am not making any typos, my do..ends match up, etc. If my code were in a string, ruby -c (and other static code tools) would pass right over it.
I suggested Giles replace his line with: instance_variable_set("@#{option}", attributes[option.to_sym]).
