[erlang-questions] My biggest beef with Erlang
Robert Virding
rvirding@REDACTED
Mon Nov 26 22:32:42 CET 2007
On 26/11/2007, Christian S <chsu79@REDACTED> wrote:
>
> As for remote procedure-calls my current feeling is that this would
> look quite okay: "Mod:Fun(Arg1, Arg2,...)" as "(:(Mod Fun) Arg1 Arg2
> ...)" a local call would be just (Fun Arg1 Arg2 ...) and that's the
> common case. Does well with hierarchical module names too.
>
> It follows common lisp syntax for arrays "#(1 2 3)" and for quoting
> literals "'(a b c)" .
That would work ok and not be too unlispy. The question is how would you
handle the different cases where parts are either atoms or variables:
mod:func( ... )
Mod:func( ... )
Mod:Func( ... )
You would then have to start using quotes inside the :( ... ) construct and
it would look strange for the common case:
(:('mod 'func) ... )
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?
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071126/0a848c7c/attachment.htm>
More information about the erlang-questions
mailing list