[erlang-questions] Interesting style i haven't seen....

Tony Rogvall tony@REDACTED
Sat Oct 31 14:49:00 CET 2009

As already pointed out, this is new stuff, that has to do with  
"abstract" modules
(You can find it in beam_emu.c apply_last)

The call corresponds to:
	 apply({dog,"Fido"}, woof, []).

As you can see it is not {dog,woof} !

This feature is just an implementation detail and may change.


On 30 okt 2009, at 21.34, Robert Virding wrote:

> 2009/10/30 Mihai Balea <mihai@REDACTED>
>> On Oct 30, 2009, at 1:22 PM, Dave Smith wrote:
>> "When applied to a number N of arguments, a tuple
>>> {Module,FunctionName} is interpreted as a fun, referring to the
>>> function FunctionName with arity N in the module Module. The  
>>> function
>>> must be exported. This usage is deprecated. See Function Calls for  
>>> an
>>> example."
>> I've always wondered why that particular syntax quirk is being  
>> deprecated.
>> I think it's neat.
> They are a remenent from the bad old days when erlang was less  
> functional
> than it is today and we didn't have funs This was a hack and has no  
> reason
> for existence now that we do have funs.
> Robert

More information about the erlang-questions mailing list