by repiret · 6mo ago · 0 comments
There's a niche available for a language which is relatively easy for a human to read, but with a very powerful at the expense of difficult to use type system. The language would let you make all sorts of assertions whose meaning are easy for the human to see, but to compile would need to come along with correctness proofs. The language is meant to be written by AI, which can battle the compiler, and write the proofs, but then read by humans who can verify that the AI wrote the program they wanted and/or direct the AI to make changes.
I find this staggeringly hard to believe. Most bugs are logic errors. How does Rust or Haskell prevent these?
Are they? IME most bugs are type errors.
Or rather, IME most bugs are logic errors only because I've excluded the possibility of type errors by using a sophisticated type system.
I think porting your program to Haskell would make all of your bugs logic errors, rather than only most of them.