4 ms·
>What part of rust prevents the writing of bugs Expressive type system, strong and static - JS is weak and dynamic. This is not limited to Rust - but if you're
by rubber_duck 8y ago
>What part of rust prevents the writing of bugs
Expressive type system, strong and static - JS is weak and dynamic. This is not limited to Rust - but if you're aiming for correct code pretty much anything after C/C++ and maybe PHP is better than JS and it's million and one way to write unexpected bugs and 10.000 ways to do the same basic thing (with an NPM package no less) of which each dev/library chooses it's own path for cool factor.
Who would even argue that JS is better for writing correct code over a language that's obsessive about security and correctness. Last time I checked Rust wouldn't even upcast ints FFS, meanwhile in JS you can't even be sure what "this" refers to in any given context and 0 == '0' == [0].
- pythux 8y agoBabel makes extensive use of Flow. So I guess that counts as expressive static typing.