4 ms·
Yeah once they implement the proposal to add types we will
by fryktelig 3y ago
Yeah once they implement the proposal to add types we will
- mgaunard 3y agoThe whole point of JavaScript is that it's dynamically-typed. If you want static typing just use C++ or any other established programming language.
- bigfudge 3y agoI’m not sure how people are supposed to do that in the browser. This feels like an excessively dismissive comment.
- mgaunard 3y agoHave you not heard of WebAssembly?
- kangalioo 3y agoWebAssembly is not without tradeoffs either. I'm not an expert, but it's often heavier due to bundling the native language's stdlib; it's annoying to interop with the browser environment because that's still JavaScript-tailored; it's also just hard to write code that can be compiled into WASM (e.g. in Rust, it needs to be `#[no_std]`)
- mgaunard 3y agoIf you're doing real work, you don't interact with the browser. If you're just glueing things together between APIs, then JavaScript is fine, and static typing would just get in the way.
- marcosdumay 3y ago> it's dynamically-typed Yet, most of the code people write has statically defined types. Anyway, the whole point of JavaScript is that it runs on the browser. Outside of that, it has no strong points. Even though most of them are not weak enough to immediately abandon the language, its type system is one of the weakest.
- leptons 3y agoJavascript's dynamic typing is fine if you aren't a really shitty programmer.