3 ms·
Sometimes, a module is much more than just a collection of functions. Sometimes, a module is a framework, or a whole embedded domain-specific language. At least
by oleks 11y ago
Sometimes, a module is much more than just a collection of functions. Sometimes, a module is a framework, or a whole embedded domain-specific language. At least, it usually encompasses a way of thinking about a given problem.
Erlang is simple-minded about this: frameworks get a special place in Erlang, and EDSLs are hard to come by since you can't declare, or override syntactic structures.
Taking modules out (in any language), you remove the programmer's option to semantically structure what they deliver into a holistic "thing". This may be a good thing: you can avoid monolithic modules.
So I think both options would be nice.