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

JSBI-style polyfill: Volunteers wanted! #17

Open
littledan opened this issue Nov 13, 2019 · 9 comments
Open

JSBI-style polyfill: Volunteers wanted! #17

littledan opened this issue Nov 13, 2019 · 9 comments

Comments

@littledan
Copy link
Member

JSBI provides a function-based polyfill of BigInt. This doesn't provide BigInt syntax, but it lets people use the functionality without having BigInt built-in to their JS engine. I believe a similar polyfill would be useful in BigDecimal, once we have the API worked out, to get feedback through prototyping. Would anyone be interested in drafting one?

@fabiosantoscode
Copy link

@littledan I'm in.

Have you tried contacting them to see if they might be interested in supporting BigDecimal as well?

Would be nice for one library to do both.

@littledan
Copy link
Member Author

littledan commented Nov 17, 2019

@fabiosantoscode Them = who? I was planning on filing an issue in the decimal ecosystem libraries' repositories to get their feedback once we move along a little more. For JSBI, this was written by the V8 team in conjunction with their BigInt effort; I wasn't planning on bothering them about this.

Instead, I saw this as a good opportunity to bring in new people who want to contribute to a TC39 proposal.

@fabiosantoscode
Copy link

I suppose that having decimals in their library is something they might want!

@littledan
Copy link
Member Author

Well, maybe you could ask in their issue tracker if they would welcome this sort of contribution? (My impulse is still to separate them; no need for a one-stop shop here.)

@jakobkummerow
Copy link

JSBI author here. Not interested. BigDecimal libraries should be separate from BigInt libraries.

@MikeMcl
Copy link

MikeMcl commented Mar 6, 2020

@littledan

A draft polyfill is available here.

@Yaffle
Copy link

Yaffle commented May 25, 2020

https://github.com/Yaffle/BigDecimal - I have tried to implement over the native BigInts, but this implementation can be buggy, I was testing it using the polyfill by @MikeMcl .

@yukinotech
Copy link

https://github.com/yukinotech/JSBD an implement which is refered to https://github.com/tc39/proposal-decimal/blob/master/bigdecimal-reference.md . it is not finished yet,some method has not been impleted.

@sarahghp
Copy link
Contributor

Hi @yukinotech! Thanks so much for implementing this polyfill. With the changeover in champions and various events, I don't think we're quite at the point of a stable API where we should be encouraging much use outside of experimental runs. We can then stay in touch as the API evolves and keep things in sync.

Also, what would you think about adding some notes that the API is unstable and linking to the survey (https://forms.gle/z6m2A9GkRheLKWdj8) for folks who do choose to try it out?

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

7 participants