[erlang-questions] Parameterized module initialization

Anthony Ramine <>
Wed Jun 27 11:18:30 CEST 2012


I find it way saner for a parameterized module to be a mapping from modules to modules than to be a way to encapsulate some arbitrary terms.

I may be wrong but I think that it would be easier to implement and reason about them in a non leaky way if their arguments were only module names.

--
Anthony Ramine

Le 26 juin 2012 à 20:32, Richard Carlsson <> a écrit :

> Parameterized modules in Erlang already correspond to what ML/Caml calls "functors": an abstraction over modules. What you decide to parameterize over: terms or other modules (or possibly even types, though I'm not sure what would be needed to support that), is up to you.



More information about the erlang-questions mailing list