[erlang-questions] My biggest beef with Erlang

Robert Virding rvirding@REDACTED
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 ... )

Robert

On 26/11/2007, Alex Alvarez <eajam@REDACTED> 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
> From: rvirding@REDACTED
> To: chsu79@REDACTED
> CC: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] My biggest beef with Erlang
>
> On 26/11/2007, *Robert Virding* <rvirding@REDACTED> 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. :-)
>
> Robert
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071128/f2df4639/attachment.htm>


More information about the erlang-questions mailing list