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.
2
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.
Aren't there compile time duration implications for having dependent types?
1
If you're talking about running the interpreter at compile time, no more than regular type systems AFAIK – just depends on how much compile time computation you end up doing. Not sure about the impact on compiler passes though.
1
1
Show replies


