Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can’t remember wishing I had int32 or uint8 if that’s what you mean. Not having int64 or int128 is kind of annoying but bigint fills in there fine.


I think they mean splitting the "Number" [0] type into an integer type and a decimal type.

Currently the "Number" type is used for every number and it gets stored as a double, and can "only" represent "integers" safely in the range of ±(2^53 -1). Though there is a "BigInt" [1] type.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data...

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data...


Mainly:

* Integer types of various sizes (for efficiency) and so you don't have to constantly do floating point comparisons (i.e. equal within a small delta) and generally have better compatibility with other languages. * Decimal floating point type so you can work in base-10 and don't have rounding issues.

Plus all of the error checking you get for free if you're using typescript instead of raw-dogging it with plain javascript or coffee-script :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: