[erlang-questions] Pipe Operator in Erlang?

Éric Pailleau eric.pailleau@REDACTED
Fri Jul 10 00:24:42 CEST 2015


Hi,
Yes, I forgot this. Joe's approach is more general. My wish is more prosaic, to let Erlang code syntax more compact and readable.
Erlang power is in asynchronous messaging, and ! is its operator. In the meantime some behaviours have synchronous call but need function calls, and no operator available. 
I suppose the reason is that not any Pid can answer back a synchronous answer. In such case an exception could be raised.
A = catch Pid |  {somemessage, somevalue }. 
This would probably need a timeout. On other hand,  ! + receive may wait forever. | could do the same.

Le 9 juil. 2015 22:13, Ulf Wiger <ulf@REDACTED> a écrit :
>
>
> > On 09 Jul 2015, at 20:34, Éric Pailleau <eric.pailleau@REDACTED> wrote: 
> > 
> > A bit off topic too, but I would really love pipe as synchronous message passing. 
> > A = Pid |  {somemessage, somevalue }. 
> > 
> > Instead sending message with ! and wait with receive statement. 
>
> That sounds like Joe Armstrongs ‘!!’ operator, which he proposed while working on the notion of “conteptual integrity”. 
>
> https://www.sics.se/~joe/talks/acm2003.pdf 
>
> BR, 
> Ulf W 
>
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc. 
> http://feuerlabs.com 
>
>
>


More information about the erlang-questions mailing list