-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Float" in J8 should probably be "Decimal" #1968
Comments
JSON is a grammar, i.e. syntax-only -- it doesn't specify what types a given JSON message maps to It fundamentally can't because Python, JavaScript, C++, etc. have different types Oils behaves like Python -- (and I think Ruby probably has this behavior, maybe Raku, PHP, etc.) |
i.e. J8 is like JSON and is logically separate from the interior types of Oils It is valid to map J8 number syntax to a Decimal in some other programming language which supports Decimal But Oils doesn't have Decimal Maybe this can be clarified somewhere, not sure where. maybe a FAQ |
Question on issue #1968 Unrelated: fix spec test.
OK I added a FAQ in doc/j8-notation, thanks for the feedback |
IIUC, the JSON number type uses the
integer fraction exponent
format, which represents arbitrary-precision decimals. These in general don't map cleanly to any floating point representation, so the specification should probably be clear that these are decimal rather than floating point numbers.The text was updated successfully, but these errors were encountered: