[erlang-questions] '--' BIF to be used with caution?

Malcolm Dowse malcolm@REDACTED
Thu Feb 5 15:30:02 CET 2009

> > The unresponsiveness seems to be caused by '--' being a BIF. Is there a
> good
> > reason for making it a BIF if it's not always an improvement?
> I suppose it is a BIF because it is an operator (although that is not
> strictly necessary).
> Nowadays we always make new BIFs non-blocking ("trapping" as we call it) if
> they
> can run for a long time, but we usually only fix old BIFs if there is
> a real problem in a real
> application.
> I have added a warning note to the reference manual and to the
> documentation
> for lists:subtract/2. (Will appear in R13A.)

I don't mind too much if '--' remains O(N^2). But the fact that it made ERTS
unresponsive is more of a worry, to me, because this seemed to go against
the spirit of the language. I my case, I knew that my algorithm was fairly
brutal, but I thought to myself "Ah, it will only take a few minutes, and
I'll execute it in a background process, so it will be OK".

Personally, I have no problem with this being left as a "known issue" for
the time being. But maybe that's just because I now know about it. :-)


> /Bjorn
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090205/c261eb88/attachment.htm>

More information about the erlang-questions mailing list