[erlang-questions] lists:reverse/1 as a built-in function

Bjorn Gustavsson bjorn@REDACTED
Mon Jan 15 09:48:41 CET 2007

Robert Virding <robert.virding@REDACTED> writes:

> Sorry I think there is definitely a difference in stature between 
> functions which are part of the language, BIFs like spawn and link, and 
> normal user defined functions. If I redefine spawn then I have changed 
> the semantics of Erlang, just as if I were to allow modifying how 
> receive or ! works. Just because they have a special syntax does mean 
> that they are more fundamental than spawn or link. The reason we did not 
>   define a special syntax for them was because they do not need it, and 
> because what a language does NOT need is a lot of unnecessary extra 
> syntax. But we can make operators for the lot of them and the problem 
> will be solved.

The current behaviour would be fine if it was decided once and for all
which functions are BIFs, and we never added new BIFs.

Unfortunately, we do add new BIFs, and if we choose to make them auto-imported,
we may break code that was written long before the BIF was introduced.
That is bad.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list