News for hackers. Stuff that matters.
Re:Six Years of Professional Clojure by travisjungroth on Monday August 02, 2021 @03:11PM (#28041272)
> Types (in a reasonable static type system, not, say, C) are never wrong.

Oh man. This is the fundamental disagreement. Sure, you can have a type system that is never wrong in its own little world. But, that's not the problem. A lot of us are making a living mapping real world problems into software solutions. If that mapping is messed up (and it always is to some degree) then the formal correctness of the type system doesn't matter at all. It's like you got the wrong answer really, really right.

Re:Six Years of Professional Clojure by lolinder on Monday August 02, 2021 @04:23PM (#28042138)
> A lot of us are making a living mapping real world problems into software solutions. If that mapping is messed up (and it always is to some degree) then the formal correctness of the type system doesn't matter at all.

If I'm understanding you correctly, you're saying statically typed language can't protect against design flaws, only implementation flaws. But implementation flaws are common, and statically typed languages do help to avoid those.

Re:Six Years of Professional Clojure by c-cube on Monday August 02, 2021 @03:42PM (#28041651)
I'm not saying types always model your problem properly! That's not even well specified. I'm saying that "x has type foo" is never wrong if the program typechecks properly. That's totally different, and it means that you can rely on type annotations as being correct, up-to-date documentation. You can also trust that functions are never applied to the wrong number of arguments, or the wrong types; my point is that this guarantees more, in a less expressive way, than specs.
Re:Six Years of Professional Clojure by travisjungroth on Monday August 02, 2021 @05:30PM (#28042928)
You can statically analyze specs and check them at runtime if you want.
Re:Six Years of Professional Clojure by c-cube on Wednesday August 04, 2021 @10:59AM (#28061765)
Can you? Is there any tool that actually does that reliably?
Re:Six Years of Professional Clojure by travisjungroth on Wednesday August 04, 2021 @07:38PM (#28067851)
Re:Six Years of Professional Clojure by c-cube on Thursday August 05, 2021 @03:11PM (#28078152)
The words "static" or "analysis" do not appear there. I imagine you meant that you can runtime check the specs, which, well, is no replacement for a type system.