[erlang-questions] Parameterized module initialization

Anthony Ramine n.oxyde@REDACTED
Thu Jun 28 10:51:47 CEST 2012

There is no point in trying to enforce that with the current implementation, you're right; but what I would like is proper functors where BEAM knows about them and not just modules transformed at compile-time. A man can always dream, right?

Anthony Ramine

Le 27 juin 2012 à 18:08, Richard Carlsson a écrit :

> In Erlang, however, there is no reason to limit the type of a module parameter. Indeed, the only way to enforce it would be to add runtime checks at each entry point. The implementation is not simplified - it gets more complicated. In practice, it is probably a good idea to mostly parameterize modules with respect to other modules (i.e., callbacks), but there's no point in trying to enforce that.

More information about the erlang-questions mailing list