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

Document more about challenges in the current ecosystem #48

Open
littledan opened this issue Feb 4, 2020 · 1 comment
Open

Document more about challenges in the current ecosystem #48

littledan opened this issue Feb 4, 2020 · 1 comment

Comments

@littledan
Copy link
Member

The README asserts that not having a decimal type causes problems for JavaScript programmers. Have you faced these problems? If we could document them with the proposal, or link to references, it would be very helpful.

@magnusjt
Copy link

Yes, I've had plenty of issues. It seems no-one manages to cover all edge cases when handling money without bigdecimals. Here's a list of issues I've opened over the years:

ikr/money-math#28
dinerojs/dinero.js#7
dinerojs/dinero.js#8 (closed, but not fixed I think)
davidkalosi/js-money#32
ikr/money-math#34

Also:
openexchangerates/accounting.js#222

Some try to use integers, but in addition to the issues noted in this proposal:

  • Without bigints you'll have a hard time with crypto currencies that have many decimals
  • Currency exchange often use decimals, and you can't just multiply an integer number of cents with a decimal and get the correct solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants