[erlang-questions] R13B prefers reference() to ref()
Kostis Sagonas
kostis@REDACTED
Wed Jun 3 08:21:15 CEST 2009
Vincent de Phily wrote:
> On Wednesday 22 April 2009 19:10:26 Kostis Sagonas wrote:
>> Sorry about this incompatibility, but it was pointed out to us that the
>> use of ref() as type is inconsistent with the rest of the language (all
>> primitive types, e.g. atom(), pid(), binary(), are such that they map to
>> is_* guards, and there is no is_ref/1 guard, but is_reference/1). Also,
>> using ref() is inconsistent with Edoc that also uses reference(). So we
>> changed this.
>
> If you did it for ref -> reference, how about doing it for bool -> boolean ?
>
> I know booleans aren't technically a primitive type, but that'd still be One
> Less Surpise.
Vincent is of course right in his suggestion.
We have discussed the issue and decided on the following strategy:
1. For the upcoming R13B01 we will make boolean() an alias for bool().
This will allow both names to be used for the time being.
In R13B01, users will get a warning if they have also defined a
boolean() type in their project but things will work as they
currently do (meaning their definition of boolean() will override
the default). No warning will be spit for using bool() in some file.
2. R13B02 will omit a warning when using bool() instead of boolean()
and therefore prompt users to convert.
3. In a later Erlang/OTP version (R14??) bool() will be deprecated.
Kostis
More information about the erlang-questions
mailing list