[erlang-bugs] A funny bug
Fri Aug 2 16:57:10 CEST 2013
On 2 Aug 2013, at 15:55, Anthony Ramine <> wrote:
> The function is not documented not because of laziness (I always document things that should be documented) but because it just shouldn't be used outside of erl_eval. Anyone interested in the details of prim_eval should just look at the commit message I wrote when I introduced it.
Well, many of us have felt that it's an unfortunate shortcoming of Erlang that receive clauses cannot be parameterized. I created plain_fsm back in 2004 as an explicit workaround for this (using a parse_transform).
So arguably, a way to parameterize receive *should* be available, and *should* be documented. I'm not saying that prim_eval:'receive'/2 is that very thing that should be documented, but it comes close enough that Erlang wizards like Tony should not only be excused for playing around with it, but should be *expected* to. ;-)
I aim to play with it myself, once I have some spare time.
Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
More information about the erlang-bugs