4 ms·
Also, no integers. Who needs integers anyway?
by vijayp 13y ago
Also, no integers. Who needs integers anyway?
- codeulike 13y agoOk, thats true. And some of the built-in functions are crazy - parseInt("09") anyone? - but the basic workings of the language seem ok to me.
- zxcdw 13y agoThe problem is that when the base language has such limitatios and funky semantics, how should languages which target that be able to deal with that in 1) standard 2) predictable 3) efficient way? This is the reason CPU instruction set architectures are so simplistic and "low level" and don't really do things for you -- because if they did, targetting such a CPU would be a major pain with all inefficiencies due to workarounds due to funky and incompatible features.
- ihsw 13y agoType-casting is a nightmare in all languages that utilize duck-typing, both implicit and explicit type-casting causes trouble in unexpected ways.
- thejsjunky 13y agoThat's a fair criticism, but it needs qualification. JS doesn't have an integer type currently, but engines can be smart about using integers behind the scenes for efficiency. In terms of your ability to use them explicitly there's asm.js, typed arrays, and various proposals like value objects for the future.
- azakai 13y agoDynamic languages typically lack them: Lua, Python, Ruby, JavaScript, etc.