For those who understand networking: the Mirage TCP/IP networking
stack [1] in pure OCaml is a must. It's an object of extreme beauty, and
possibly the most eloquent argument for types, types inference and
algebraic data types I can think of. The TCP state machine is mostly specified at type level [2], preventing numerous potential bugs in one fell swoop.
Reading this code is probably most enlightening if you have already written networking protocols.
NB: this has nothing to do with OCaml, other comparable languages with ADTs (Scala, Rust, Haskell, F#) would be similarly suitable.
Reading this code is probably most enlightening if you have already written networking protocols.
NB: this has nothing to do with OCaml, other comparable languages with ADTs (Scala, Rust, Haskell, F#) would be similarly suitable.
[1] https://github.com/mirage/mirage-tcpip
[2] https://github.com/mirage/mirage-tcpip/blob/master/lib/tcp/s...