3 ms·
Totally agree with this sentiment. In javascript, there's only one number type: Number. And it's a 64-bit float. You don't even need integers as a programmer, i
by noway421 5y ago
Totally agree with this sentiment. In javascript, there's only one number type: Number. And it's a 64-bit float. You don't even need integers as a programmer, it's a low-level implementation detail that JIT sometimes employs to speed up your code.
If you absolutely have to, there are escape hatches like Uint8Array/Buffer/etc which allow you to deal with bytes. There are also ways to force JIT to treat your numbers as integers with tricks like `i = i|0`, but that's barely used.
Obviously compiled languages are different, but to me you could rename `signed integer` to `integer` and `unsigned integer` to `rawdata32` or `byte4`