Re: Prize and Milestone as mutable state idioms
"Tyler Close" <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 2, 2008 at 12:13 PM, David Wagner <[email protected]> wrote: > Also, one has to check for numbers that would overflow the precision > of Javascript's builtin number type. Actually, what do you do about > the latter? That's an excellent question. I hadn't done anything about it. The JSON spec says you can output any integer, but of course Javascript can't handle any number and it looks like all the Javascript JSON parsers just silently turn a too big integer into an approximation. For Waterken server <=> Waterken server communication, this isn't an issue, since the BigInteger type is used, but it's clearly an issue for Waterken server <=> web browser communication. I suspect it would be safest to drop to the lowest common denominator and refuse to encode any number that Javascript cannot accurately represent. So much for BigIntegers. Comments? --Tyler