Re: adding two quantities
> >From Googling around, I gather it's evil only when used wrong.
[color=blue]
> There are no circumstances under which it is _necessary_ to use eval.
> The few circumstances under which it is appropriate to use eval is where
> it is necessary to execute JavaScript source code when the contents of
> that source code cannot be predicted. That is an extremely rare
> condition and will almost never be the case in a normal Internet
> browsers scripting context.[/color]
[color=blue][color=green]
> >Below is an older (1998) comp.lang.javas cript posting:[/color][/color]
By Google, the first use of the phrase "eval is evil" in this group was Mar 27,
1998 by jason olmsted. Clearly, the problems with the misuse of eval have been
understood for a long time.
> >From Googling around, I gather it's evil only when used wrong.
[color=blue]
> There are no circumstances under which it is _necessary_ to use eval.
> The few circumstances under which it is appropriate to use eval is where
> it is necessary to execute JavaScript source code when the contents of
> that source code cannot be predicted. That is an extremely rare
> condition and will almost never be the case in a normal Internet
> browsers scripting context.[/color]
[color=blue][color=green]
> >Below is an older (1998) comp.lang.javas cript posting:[/color][/color]
By Google, the first use of the phrase "eval is evil" in this group was Mar 27,
1998 by jason olmsted. Clearly, the problems with the misuse of eval have been
understood for a long time.
Comment