Effective ML
Jane Street · 3 位 HN 用户推荐 · 2018–2019
> specify manually all the types of all the functions This is usually encouraged in OCaml, in the form of a .mli file. I think types can be a lot more than "compiler checked documentation that can also work as basic tests". They allow you to encode invariants that allow the compiler to check more than basic stuff. I thought this video had a good example. [link]
— chillee, 2018That'll be a great addition to the book. Can I also recommend Yaron Minsky's talk on OCaml, specifically the part where he talks about "making invalid states impossible": [link]
— jasim, 2018for a good explanation what ADTs are useful for watch Effective ML by Yaron Minsky from 18:00 [link]
— scns, 2019