raganwald-deprecated / homoiconic

An experiment in publishing code and words about code on a small scale.
http://github.com/raganwald/homoiconic/tree/master/homoiconic.markdown
Other
1.82k stars 112 forks source link

string_to_proc may be a code smell #5

Closed twhaples closed 12 years ago

twhaples commented 12 years ago

It is a code smell to use programming language constructs to evaluate strings as code, especially where other metaprogramming facilities are readily available. Side effects include, but are not limited to, damaging syntax highlighting and a variety of code inspection / debugging tools.

In general, the string_to_proc method scares me and seems like fundamentally a bad idea.

raganwald commented 12 years ago

String to proc is a language smell... Better metaprogramming facilties actually aren't available to replace its function.