Hacker News new | ask | show | jobs
by t8sr 1199 days ago
If you asked me what the biggest areas were where JS needs work, it wouldn't be "syntax sugar for separating numeric literals", it would be stuff like "integers".

At this point I'm almost afraid to ask, but if JS can evolve in major ways like this, why can't we address some of the basic shortcomings of the language?

3 comments

Ironically this is the only JavaScript change (except for top level await) I did not include, maybe I'll edit it and add it.
Those are 2 of the most significant (and eagerly awaited) new(er) features though (although I thought BigInt was more like 5-6 years old)

edit: Edge and Safari only added support in 2020, so it has only been useable without polyfills for a few years

I added them now so the article is complete.
I develop with JavaScript professionally and I rarely think about floating point number/integers when building UI or Node.js code. The "number" type is good enough in 99% of use cases. If you really need integers, there are specialized uint arrays and BigInt that handle various use cases.
None of these changes are that major. They don't breaking existing code.

Breaking existing code is a pretty major line to cross for anyone maintaining a language, library or tool. (Even though some people do it willy nilly....)