MOO-cows Mailing List Archive


Re: eval / toliteral safety question

Seth I. Rich drew these hieroglyphs:
> Is there EVER a circumstace where
>   eval("return " + toliteral(x) + ";")[2]
> would not equal x?  Can anyone think of a situation in which this would
> represent an unsafe operation?  I've been trying to think of a value for
> x for which this expression could have side effects, but I haven't come
> up with anything yet, and I suspect I won't.
> (See, I shut up on MOO-Cows for a month or so, but I'M BACK BWAHAHAHAcough)

I can't think of anything, but why do you want an identity function?


Home | Subject Index | Thread Index