ML-style module systems are lots of fun haha
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
1
6
Do you prefer SMLs modules?
1
I dunno much of the difference, although I think I'd probably prefer OCaml's. By clunky I'm referring to the syntax, the way you are expected to ‘open’ modules, and the stratification of the core and module languages (although OCaml breaks this slightly in places).
1
Like, I think it would be nicer if the syntax core language and the module language were brought closer together (same goes for the type and term languages), even if you don't go all the way with dependent types.
I think Futhark does this and it looks really nice: futhark.readthedocs.io/en/latest/lang
But yeah, it's just the usual awkwardness that you expect with OCaml. 😅
1
Have you seen Rossberg's 1ML paper? He proposes a module system that is unified with the core language, elaborating to System F-omega (instead of needing dependent types)
people.mpi-sws.org/~rossberg/1ml/
1
Yeah, it's cool/impressive work! Though personally, I think if you're going to the effort of having a new language I'd love it if we could just have dependent types from the start, heh.
1
2
Show replies


