Is JavaScript's eval really evil?

"eval() is evil."

If you're a Web developer, you've probably heard this, along with other JavaScript commandments like "don't use with()" and "don't use ++ or --". Doug Crockford's list of "bad" JavaScript language elements is pretty long, and they're pretty subjective.

Meanwhile, Crockford had for much of his JavaScript career been a driving force behind what I call the "Javafication of JavaScript". That is, making complex hunks of code in JavaScript to simulate Java idioms and behaviors (like classical inheritance).

While Crockford has since recanted much of that "Javafication", the ripple effects are still with us today. Further, his "bad parts" of JavaScript stem from the same mindset. Basically: JavaScript is somehow "broken" and we must avoid tangling with complexities like when you need curly braces.

An open-minded approach

We should all be aware of the features and complexities of JavaScript. Instead of blindly following word from on high about