3 ms·
> compiled programs are usually correct This is absolutely false. Compiled programs might be correct with respect to type safety, but that is very different f
by lisper 4y ago
> compiled programs are usually correct
This is absolutely false. Compiled programs might be correct with respect to type safety, but that is very different from being correct. There are all kinds of ways that programs can fail besides type errors.
In fact, this widespread false belief is IMHO one of the strongest arguments against using enforced-compile-time-strong-typing because it lulls you into a false sense of security. I have a long list of war stories where this led to problems that ranged from annoying to very nearly catastrophic.
- josephg 4y agoOf course there’s lots of ways a compiled program could still be incorrect. But in my experience (having spent years with both languages) the practical per-line error rate of rust code I write is many times lower than my per-line error rate in javascript. (And typescript is somewhere in the middle for me). Yes, you still need tests. But testing is never perfect. Bugs still slip through. I like not needing to be as paranoid in rust as I am in other languages.