[erlang-questions] The Beauty of Erlang Syntax

Tony Arcieri tony@REDACTED
Fri Feb 27 00:10:45 CET 2009


On Thu, Feb 26, 2009 at 4:00 PM, Ulf Wiger
<ulf.wiger@REDACTED>wrote:

> And this:
>
>  > {ok,Pid} = gen_server:start(my_mod,[],[]).
>  > Res = gen_server:call(Pid, {my_fun, Args}).
>  >
>  >
>  > compare this with Reia:
>  >
>  > Res = MyClass.MyMethod(Args)
>
> is simply an apples and oranges comparison. You know
> very well (since you love Erlang) that the convention
> is to hide gen_server specifics behind a module API,
> so the honest comparison would be
>
> MyMod:MyFun(Args)
>
> vs
>
> MyClass.MyMethod(Args)
>
> I fail to see how one is very low level, and the
> other is not.
>

Really what Reia offers here is a formalization of this convention into
first-class syntax, so you needn't wrap gen_server in every module you use
it with.  Reia's compiler does that for you.

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090226/41b0333c/attachment.htm>


More information about the erlang-questions mailing list