Erlang is getting too big
Thomas Lindgren
thomasl_erlang@REDACTED
Tue Oct 14 16:25:51 CEST 2003
--- Richard Carlsson <richardc@REDACTED> wrote:
> > 2. Assuming that we do:
> >
> > Another approach to unifying guards with
> expressions
> > would be to introduce the appropriate type tests
> as
> > BIFs. Apart from float/1, this seems
> straightforward?
>
> Well, the "is_..." forms are BIFs, but I assume you
> mean to keep the names integer(X) etc. and also
> introduce them as BIFs.
Yes.
> But since auto-recognized BIFs override local
> definitions (sic!),
> this would probably break a lot of existing code.
If you mean BIFs that do not need the erlang: prefix,
then the override nowadays goes in the other
direction. (And correctly so, IMO.)
-module(test).
-compile(export_all).
abs(X) when X > 0 ->
X;
abs(X) ->
-X.
1> c(test).
... Warning: defining BIF abs/1
Best,
Thomas
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the erlang-questions
mailing list