Open 0joshuaolson1 opened 7 years ago
From a conversation with @farskipper:
Infinity, and NaN especially, would be annoying to constantly check for, and we should not expect KRL users (or programmers?) to understand floating point math.
Instead, let's break from JavaScript's model and use base-10 numbers. They can represent normal floats, and calculations like $0.01 + $0.02 are easier to get right. Some libraries to help:
Thinking ahead: because event:send
can communicate across different engines, older engines won't understand these numbers in event attributes.
I wouldn't worry that much about old engine comparability until we release 1.0.0. i.e. semver rules for 0.x.x
are minor releases are breaking when major is 0
-0.0
is not different from positive zero.Infinity
andNaN
are parsed as variables but the json standard doesn't include them either. What about ECMAScript 1.5/1.6 values like+2.E+0
that aren't legal JSON (currently no) and2.E+0
that are legal JSON (also no)?