3 ms·
> No study I've seen (quite a few) has ever shown that. There's a really great one that shows that Typescript or Flow prevents around 15% of Javascript bugs.
by IshKebab 3y ago
> No study I've seen (quite a few) has ever shown that.
There's a really great one that shows that Typescript or Flow prevents around 15% of Javascript bugs.
It would be difficult for a study to show that Rust's strong typing or borrow checker prevents bugs, but anyone who has used Rust extensively knows it to be true. It's similar to Haskell's strong types and immutability preventing bugs. Google "if it compiles it works".
I think you could do a study to prove this, but experiments aren't the only way to get knowledge. They are the best when possible but sometimes they are impractical. Programming language studies tend to focus on "get some students to spend a few hours writing code from scratch" tasks which can even lead to conclusions that are the opposite of reality for realistic programming. For example that static types hurt productivity.
> the vast majority of bugs can still occur and in practice, do occur.
Right, but they are much less likely to occur.
- brabel 3y agoCould you please link to the Typescript study? > anyone who has used Rust extensively knows it to be true. I have used Rust extensively and have no idea whatsoever is that's true, and if you think you do, be prepared to be wrong about that, as humans are incredibly "good" at being sure that something is true until formal studies show you were wrong. Haskellers have said "if it compiles it works" for a long time, but have never been able to prove that. Again: just saying/feeling something is true doesn't make it true. > Right, but they are much less likely to occur. No, there's just no evidence! Just go to any Rust project, they have as many bugs as anything else... I wish that were false, because then I would definitely just use Rust for everything myself... but that's not at all what I've seen so far.
- kreetx 3y agoAs having written a lot of Haskell, I can tell you that people do create bugs there as well, (IMO) to a similar degree as in other languages. The choice of languages seems to come down to personal preference, as does the propensity to create bugs (come down to the specific developer). ;)
- brabel 3y ago100%. Every single study always agrees on that: developer skills completely shadow any differences between programming languages - even between categories of programming languages, like dynamic VS static typed-languages.
- IshKebab 3y ago[dead]