News for hackers. Stuff that matters.
Re:In web design, everything easy is hard again by skrebbel on Saturday February 10, 2018 @06:55AM (#16346941)
Both ESLint and TypeScript solve all of that except the integer thing.

But I'd wager that the "no integers over 2^53" is seldomly a problem, and in most other languages there's a similar problem at 2^64. If you reasonably expect to get integers above 2^53, you probably want to think about how to deal with integers above 2^64 as well. So really it's the exact same thing except JavaScript's numbers are easier to complain about on the internet.

Re:In web design, everything easy is hard again by kolinko on Saturday February 10, 2018 @07:22AM (#16347013)
Actually, in Python integers have no upper limit (sic!).

I did some Ethereum front- and backend development in both Python and in JS, and this made a lot of difference in the readability of the code. In Python, the only problems we encountered was when writing into ndb, which has 64 ints by default, whereas in JS, we had to use BigNumbers everywhere.

Re:In web design, everything easy is hard again by skrebbel on Saturday February 10, 2018 @09:37AM (#16347434)
Oh wow, really? I feel pretty stupid now. All languages I've used in anger have an upper limit for integers so I'd just assumed this was pretty much general. I see now that it works in Ruby just like in Python.

Pretty cool! Learn something new each day :-)

Re:In web design, everything easy is hard again by detaro on Saturday February 10, 2018 @11:22AM (#16347930)
It's a bit annoying when doing interop between languages that have the (more common) 2⁶⁴ limit and JS - int64 for IDs etc is fairly common and you then always have to remember to convert them, e.g. by putting IDs as strings in JSON output instead of as a number.