From: David Masover Date: 2009-10-10T01:43:30+09:00 Subject: Re: Poll on Eval in Ruby. On Thursday 08 October 2009 08:15:06 am Kazimir Majorinc wrote: > I want to > compare opinion of Ruby and Lisp programmers on eval. > ... > If you want to contribute few seconds, the poll is > on my blog, on the top of the right column. > > http://kazimirmajorinc.blogspot.com There wasn't an option for "Absolutely essential for the one time out of a billion you actually need it. Otherwise, avoid it entirely." I can't remember the last time I used eval directly in Ruby, and I've seen it maybe once or twice in library code. I've also seen it abused by people who really should know better. 90% of the time you find yourself reaching for eval, you're Doing It Wrong. Another 9% of the time, you're working around a missing language feature, and it'd be better to fix that feature, or at least bury your use of eval deep in a library. But there was the time I used Javascript on HD-DVD, which had many limitations, including not having eval. And many of its other limitations could've been worked around if there had been an eval. A simple example: Downloading and executing code was complex and often disruptive -- eval would've made it trivial. So... I avoid languages that don't have eval. But I avoid using eval in the languages I use. Does that make sense?