Skip to content
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

Numeric type Improvements #189

Open
jeromesimeon opened this issue Mar 30, 2020 · 2 comments
Open

Numeric type Improvements #189

jeromesimeon opened this issue Mar 30, 2020 · 2 comments

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Mar 30, 2020

The specification for Concerto has Integer (32bits) and Long (64bits): https://docs.accordproject.org/docs/model-properties.html#primitive-types

The current implementation supports neither. Integer and Long are treated interchangeably and internally represented as JavaScript numbers. Those are safe only up to MAX_SAFE_INTEGER which is 2^53-1 instead of 2^31-1 or 2^63-1.

Questions

  • Should we try and implement this specification.
  • Should we revise this, replace by a notion of big integer (then leave the behaviour to implementation -- this could be using the new big int for recent javascript implementations, be listed as safe only up to a MAX_SAFE number for some platforms?).
  • Should we extend support to decimal numbers (or should we implement those on top of a big int?). Usecase: monetary amounts.
@jeromesimeon jeromesimeon changed the title Status of Integer types in Concerto Status of numeric types in Concerto Mar 30, 2020
@mttrbrts mttrbrts removed the 1.0 label Sep 2, 2022
@mttrbrts mttrbrts moved this to This Year in Concerto Roadmap Dec 9, 2022
@mttrbrts mttrbrts changed the title Status of numeric types in Concerto Numeric type Improvments Dec 9, 2022
@mttrbrts mttrbrts changed the title Numeric type Improvments Numeric type Improvements Dec 9, 2022
@dselman
Copy link
Contributor

dselman commented Dec 12, 2022

This is a nice description of how Avro deals with this: https://github.com/apache/avro/blob/master/lang/js/doc/Advanced-usage.md

Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next 12 Months
Development

No branches or pull requests

3 participants