Re:A Plea for Lean Software (1995) [pdf]
by wtetzner on Wednesday August 05, 2020 @12:31PM
(#24062660)
> The module concept of Oberon's predecessor Modula-2 is still unrivalled today
I'm not familiar with Modula-2's module system. What does it provide that the module system of OCaml does not?
>.def modules that specify the interface and that can be compiled separately from their .mod implementations, which may not even exist when a client application can already be coded against the compiled interface in a type-safe way.
I believe .mli files can be compiled separately from the matching .ml files, and client modules can be compiled against an .mli that does not have a corresponding .ml file.
And OCaml also supports functors, so modules can be parameterized.
Sorry, not arguing that Modula-2's module system is not good, guess I'm just not convinced that it's unrivalled today. And for all I know ML's module system was probably influenced by Modula-2.
I'm not familiar with Modula-2's module system. What does it provide that the module system of OCaml does not?
>.def modules that specify the interface and that can be compiled separately from their .mod implementations, which may not even exist when a client application can already be coded against the compiled interface in a type-safe way.
I believe .mli files can be compiled separately from the matching .ml files, and client modules can be compiled against an .mli that does not have a corresponding .ml file.
And OCaml also supports functors, so modules can be parameterized.
Sorry, not arguing that Modula-2's module system is not good, guess I'm just not convinced that it's unrivalled today. And for all I know ML's module system was probably influenced by Modula-2.