3 ms·
> My style of coding is to write a lot of slightly dodgy code in one breath, then use the typechecker to tell me all the things I got wrong. That's exactly the
by yawaramin 4y ago
> My style of coding is to write a lot of slightly dodgy code in one breath, then use the typechecker to tell me all the things I got wrong.
That's exactly the style OCaml excels at.
> OCaml currently seems great for people who are better at getting it mostly-right first time
That's because they got it wrong a lot at first, then learned how to get it right. You've heard of people talking about how they internalized the Rust borrow checker's rules after some time, right? Well, internalizing a typechecker's inference rules works very similarly (faster if you read OP).
> I’ve seen a lot of OCaml code written by people with PhDs and backgrounds in type theory.
That's unfortunate, it's a nearly perfect language for industrial work. Tiny example of how easy it is to hack together useful tools with it: https://dev.to/yawaramin/practical-ocaml-314j#proof-of-concept https://dev.to/yawaramin/practical-ocaml-314j#proof-of-conce...