Conversation

Being able to separate interfaces from implementations, and hide internal representations is so powerful. I wish more people knew about this stuff! I find OCaml's implementation clunky in many ways, but yeah, I still really like it in general. :)
2
6
Standard ML and Ocaml have the best module systems I've ever come across, and cannot be praised without mentioning functors. I've loved them even more since Ocaml added local opens (which Merlin supports beautifully).
1
Now I just want to know how typeclasses can be added in a way that respects the sort of modularity that Ocaml demands, whilst respecting canonicity and preventing orphans. Not sure where we're at with those constraints.
2
Modular implicits seem promising (even if more design work is required). Not the biggest fan of global canonicity, but I do like local canonicity, which is part of that design IIUC. What do you mean by ‘preventing orphans’?
1
We could have a version of Haskell where orphan instances are banned outright. I've got a sense that this would be complicated in an ML-style module system, but my thoughts aren't very clear.
1
Replying to and
But yeah I feel like enforcing these kinds of global rules go against the things that make modules great, so I'm not the biggest fan if I'm completely honest? Like, it puts limits on the modules users can make, in order to enforce the global state of the package ecosystem.
2