Child modules draft feedback wanted

Romain Lenglet rlenglet@REDACTED
Mon Apr 3 09:20:22 CEST 2006


> I was considering a solution based on external calls only, not
> on implicit applies. foo:g(42) is an external call, while
> M:g(42) is an implicit apply.

More generally, I was considering the transformation of every 
statement where a module name is specified statically as an atom 
in a module's beam op. External calls fit into that category, 
but external calls don't. Probably more constructs should be 
transformed, for convenience, and not only external calls. For 
instance, -import_records statements.

And a new pseudo-BIF could be generated by the compiler:
required_module_name(Atom) -> Atom
To do the translation at runtime. The parameter to that function 
must be a statically determinable atom (a "logical module 
name"), e.g. as in call:
ReqlName = required_module_name(logical_name)

-- 
Romain LENGLET



More information about the erlang-questions mailing list