I, for one, say that I'll bear the pain for the sake of doing it
right. The bigger pains I've experienced over the last 25 years were
born of such compromises.
Cheers,
Mike
I think it matters what the language is intended for.
On a side note, I believe 64-bit integers are on the table for the
next ecmascript. Strangely, richer number types seem to be introduced
in order to support binary streams ("web sockets"), rather than for
better numerical programming, per se.
Apparently the browser eventually will become a reasonable environment
for programming applications even if it has to get there kicking and
screaming!
As far as a solution to the data type compatibility / conversion
problem, one semi-convenient approach for language developers might be
to use (portions of) GWT's java-to-javascript compiler. Another
advantage there might be the ability to use GWT's "dev mode" runtime
for debugging and running tests, which is a JVM.
-Patrick
One word: interop.
In addition to JS numbers I will add a separate big-integer (maybe big-decimal) class. Maybe it won't even be integrated with the JS numbers (similar to Java's BigInteger), and just be used for counting things without fear of overflow.
A comment on js-numbers - I guess implementing valueOf didn't solve the interop problem for you?