Subj : Re: Proper behavior of uneval(-0.0) ? To : netscape.public.mozilla.jseng From : Igor Bukanov Date : Thu Nov 13 2003 09:28 pm Brendan Eich wrote: > ... > uneval is meant to extend toSource so that any type (object or > primitive) can be decompiled to a string that, when eval'd, results in > the original value. > > With native functions, you can't write such a string, unless you simply > refer to the native's name, and that name is unambiguous when eval'd. > Natives are a hard case; objects with private data, or of a class other > than one of those that can represent itself in a source string form, are > another. Suggestions? What about throwing an exception from uneval if it can not do its job? It would allow early detection of problems with serialization via uneval. Regards, Igor .