[erlang-patches] R13B02-1: a patch for omitting a warning on {foo, bar}:fun(args) calls

Yurii Rashkovskii <>
Mon Oct 19 16:55:42 CEST 2009

On 19-Oct-09, at 7:47 AM, Richard Carlsson wrote:

> Yurii Rashkovskii wrote:
>> Currently erlc will spit a warning on this kind of constructs:
>> {db, "localhost"}:connect()
>> as opposed to
>> DB = {db, "localhost"},
>> DB:connect()
>> The warning will look like:
>> Warning: invalid module and/or function name; this call will always  
>> fail
>> which is misleading, because this call will not fail (provided  
>> modules
>> are in place and such)
> When you write code like the above, you are depending on how the  
> current
> implementation of parameterized modules works. Don't do that.

I am pretty much aware of this mantra, thanks.

In fact, I seldom use parametrized modules per se, I am just utilizing  
Erlang's capability to treat tuples as modules in another approach to  
parametrized modules I built for myself.


More information about the erlang-patches mailing list