[erlang-questions] OTP-9649 and further changes

Yurii Rashkovskii yrashk@REDACTED
Tue Jan 10 17:36:37 CET 2012


> Why do you need wrapping module name in a tuple? It works without it:
>
> Eshell V5.9  (abort with ^G)
> 1> erlang:length([1,2,3]).
> 3
> 2> M = erlang.
> erlang
> 3> M:length([1,2,3]).
> 3
>
> Is there any case when wrapping is necessary, which I'm missing?

That was just a minimal (and useless) case of how tuple modules
behave. This is a far bigger deal when you have records (or just
tagged tuples) and modules named according to them. One of the real
use cases is misultin_req:
https://github.com/ostinelli/misultin/blob/master/src/misultin_req.erl

Yurii.



More information about the erlang-questions mailing list