Hacker News new | ask | show | jobs
by steev 2124 days ago
At least for beginners, they absolutely are. I have found undergrads generally get the idea behind something like HashMap<Integer, String> but getting them to reason about OCaml modules takes quite a bit of effort.
1 comments

(int, string) Map.t doesn't seem to be too many steps away from your example. When I was learning OCaml, I found that much of the module and module type system can just be seen as a more beefed up version of interfaces in OOP languages, so it didn't take long to see its benefits.