3 ms·
I'd never say never. As I'm sure you're aware, JavaScript has had statically typed arrays since WebGL was introduced. https://developer.mozilla.org/en-US/docs/
by Lio 10y ago
I'd never say never. As I'm sure you're aware, JavaScript has had statically typed arrays since WebGL was introduced.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
- WorldMaker 10y agoES4 the version of JavaScript that time mostly forgot (except for Adobe and ActionScript) had static types that looked rather similar to Typescript/Flow. It's not impossible that it will be revisited. Especially now with the precedent from Python of defining/standardizing no runtime behavior for it, only syntax acceptance; that seems like something browsers might be more okay with versus the runtime behaviors required/encouraged by ES4.
- recursive 10y agoIt has typed arrays, but they're still not statically typed. In a statically typed language, this would not run. console.log("hello"); typedArr[0] = incompatibleType(); In javascript, it will produce "hello" as output, and then a run-time failure.