is_function vs tuples (functions in non-local modules)

Carsten Schultz <>
Fri Jun 11 17:16:47 CEST 2004


Hi Sean!

On Fri, Jun 11, 2004 at 01:24:29PM +0100, Sean Hinde wrote:
> The Fun as tuple syntax is one of the wilder old bits of cruft in 
> Erlang. I would just document that it isn't supported by your parser.
> 
> I would guess that no-one uses it in new code except to make that point 
> that they can..

I would not be too sure about that.  As long as there is no nice
syntactic short cut for 

    fun (X,Y,Z) -> foo:bar(X,Y,Z) end

(`fun foo:bar/3' would come to mind) I find it plausible that someone
writes {foo,bar} for that.  

This is of course just a pledge for that kind of syntax.  I do find
the tuple version irritating, too.

Even then the tuple version will work for a variable number of
arguments, while the fun version will not.

Greetings,

Carsten

-- 
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers, 
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20040611/df8d3ea6/attachment.bin>


More information about the erlang-questions mailing list