3 ms·
> if it compiles it typechecks is kind of tautological It's not tautological at all, because the type system in Rust and Haskell is not a trivial condition of
by samatman 2y ago
> if it compiles it typechecks is kind of tautological
It's not tautological at all, because the type system in Rust and Haskell is not a trivial condition of the language.
> not particularly effective as a saying or slogan
Neither is "if it compiles it runs", rather less so in fact, everyone is sick of hearing it, and rolls their eyes so hard it's actually audible.
Every one of these 764 bugs compiled and passed type checks:
https://github.com/tokio-rs/tokio/labels/C-bug https://github.com/tokio-rs/tokio/labels/C-bug
Not picking on tokio in particular, mind you, finding and fixing bugs is a sign of quality in a library or program.
> I believe it’s meant to be more of a “works, relative to what you might expect from other languages” kind of thing versus, “is a completely perfect program.”
Which is why I describe it as meaningless puffery. What you're saying here is that you know full well it isn't true, but want to keep saying it anyway. My reply is find a way to express yourself which is true, rather than false. I bet you can figure one out.
- kod 2y ago> the type system cannot prevent logic bugs or design bugs ^ your words, that statement is false. the type system _can_ prevent logic bugs or design bugs, exhaustive pattern matching is an obvious example. I bet you can find a way to express yourself which is true, e.g. "the type system cannot prevent _all_ logic bugs or design bugs"