Interesting discussion contrasting OCaml functors with Java interfaces: https://www.reddit.com/r/ocaml/comments/2gjcos/help_explaining_benefits_of_modules_and_functors
You can abstract over more things with functors, and they have some cool examples. Quaternions!
I also learnt that type checking modules is undecidable in general in OCaml.
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've released difftastic 0.62! In this release:
* Updated parsers for Bash, C, C++, C#, CSS, Go, Haskell, HTML, Java, JavaScript, JSON, Julia, Lua, Objective-C, OCaml, PHP, Python, Ruby, Scala, TOML, TypeScript and XML.
* Obligatory crash fixes.
https://github.com/Wilfred/difftastic/releases/tag/0.62.0
Really cute approach to reporting type errors: when there's a type error, show an example of a runtime error that the type check has prevented!
Data-Driven Techniques for Type Error Diagnosis https://escholarship.org/uc/item/59s4h4pv