[erlang-questions] My biggest beef with Erlang
Wed Nov 28 17:46:32 CET 2007
I would more translate it as:
mod:func( ... ) == (remote-call 'mod 'func ... )
Mod:func( ... ) == (remote-call mod 'func ... )
apply(Mod, Func, [...]) == (apply mod func (...))
You could actually skip remote-call and just have apply, it would be no
problem for the compiler to detect the case when the argument list is known.
Someone came with perfectly reasonable suggestion of having a macro for the
more usual case:
(: mod func ... ) ==> (remote-call 'mod 'func ... )
On 26/11/2007, Alex Alvarez <> wrote:
> Maybe I'm missing something here, but isn't this exactly like Erlang?
> (mod:func ... ) == mod:func(...)
> (apply mod 'func ( ... )) == apply(mod, func, ...)
> Obviously, the syntax changes a little bit, but all the functionality is
> there already. Actually, Erlang looks a lot cleaner from my view...
> Cheers, Alex
> Date: Mon, 26 Nov 2007 22:36:48 +0100
> Subject: Re: [erlang-questions] My biggest beef with Erlang
> On 26/11/2007, *Robert Virding* <> wrote:
> Scheme allows defining a prefix within the a symbol which means it refers
> to another module (library for them) so you would write:
> (mod:func ... )
> when you know where to go at compiletime. At least that's how I
> interpreted the spec. Then for the general case you could use:
> (apply mod 'func ( ... ))
> or how about:
> (: mod func arg1 arg2 ... )
> for all cases?
> Equivalent to funcall in CL, this would be a remote funcall. Again a bit
> heavy for the standard case.
> Of course some mailers might see that as a smiley. :-)
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions