[erlang-questions] Why we need to use make_ref in pmap ?

lang qiu qiulang@REDACTED
Mon Dec 1 07:08:03 CET 2008

 I mean can' t we just use a simple atom, say pmap, so the implementation
will look like following,

*do_f(Parent, pmap, F, I) ->
   Parent ! {self(), pmap, (catch F(I))}.*

*gather([Pid|T], pmap) ->
   {Pid, pmap, Ret} -> [Ret|gather(T, pmap)]
But I understand your point and I guess because it is the system function,
it has to make sure absolutely that it won't receive something else. If it
were not the system function, I guess a simple atom should be enough.

Do you agree ?
On Mon, Dec 1, 2008 at 11:33 AM, Matthew Dempsky <matthew@REDACTED>wrote:

> 2008/11/30 lang qiu <qiulang@REDACTED>:
> > I understand what you were saying. But can we just use a simple atom for
> it
> > instead of make_ref() ?
> Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081201/cf43aacb/attachment.htm>

More information about the erlang-questions mailing list