Eval is generally understood to perform poorly and to be unsafe. But what’s so bad about ‘with’ and ‘in’?
As you can see, there are some cases where you might want to use “with” but it can also lead to bugs which are unexpected and so difficult to debug. There’s a thread on Stackoverflow about it. My point of view is along the lines of what Alan Storm says.
My opinion is as a result of coming across a bug a long while ago. I remember trying to use “in” to iterate over some DOM nodes because I thought it was cool but strange things kept happening and I was lost as to why so I used another method. Much later I read about how it walks up the prototype chain (with respect to DOM nodes it’s a bit more complicated than that). That’s why it’s evil. Again, not because it is “wrong” but it causes more problems than it solves so it is better to avoid it and do what I know is going to work the way I want it to work.