[erlang-questions] My biggest beef with Erlang

eajam@REDACTED eajam@REDACTED
Wed Nov 28 20:53:22 CET 2007


Thanks for clearing that up.  But then again, that suggestion would make it more Lispy, and I suppose would be quite a change for the tokenizer.  Although this is certainly just talking, not like if anything like this will actually be necessarily implemented, but wouldn't it be more Erlang to have
 
mod::func(...), rather than
 
(: mod func ... )
 
Irrelevant of the form used, the point is to accept the basic syntax of the language and expand on it, not make it look like my favorite language X or Y.
 
Cheers, Alex


Date: Wed, 28 Nov 2007 17:46:32 +0100From: rvirding@REDACTED: eajam@REDACTED: Re: [erlang-questions] My biggest beef with ErlangCC: erlang-questions@REDACTED 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 +0100From: rvirding@REDACTED: chsu79@REDACTED: erlang-questions@REDACTED: 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 listerlang-questions@REDACTED://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071128/a2c0f20f/attachment.htm>


More information about the erlang-questions mailing list