[erlang-questions] Parameterized module idioms

Richard O'Keefe ok@REDACTED
Tue Apr 20 00:25:28 CEST 2010


I pointed out that modules with parameters give us nothing
that plain old closures don't, in response to which
On Apr 19, 2010, at 3:43 PM, Bob Ippolito wrote:

>>
>
> Trivial, but requires a lot of boilerplate code and certainly isn't
> any easier to understand or debug than parameterized modules. It also
> becomes impossible to write a useful type spec if you use closures
> like that.

(a) Such boilerplate code as is required can be automatically generated.
(b) The possibility or otherwise of useful type specs depends on what
     the type language allows.  Dependent type systems would have no
     trouble at all; the question of _how much_ of the machinery of a
     dependent type system one needs is an empirical matter.
(c) A dismissal of closures on such grounds is ALSO a dismissal of
     modules with parameters since each can simulate the other.



More information about the erlang-questions mailing list