TIL OCaml has .mli files which are much like .h files in C: they define (and enforce) a public interface.
This seems to be less popular in newer languages: we tend to prefer public/private annotations in a single file. I'm not sure why this changed.
Related Posts
I really like pattern matching in Rust, but I find myself using it less and less.
`if let` and `let ... else` require substantially less indentation, and I often use them for Option values.
I don't miss this syntactic sugar in OCaml though. Maybe it's just because OCaml has a 2 space indent, unlike Rust's 4 space indent?
I'm playing with Zeal/Dash so I can view stdlib docs offline.
(I've been coding on public transport recently, without a reliable data connection.)
Anyone have tips for making the most of this setup? AFAICT docsets are basically HTML underneath.
GNU Make defaults to a single worker, and newer build tools (e.g. ninja) default to the number of physical CPUs.I wish there was an option for 'leave me a little bit of my machine to do stuff'.