Re: [PATCH] Consistent type names in error messages
| From: | Andrea Faulds | Date: | Sun, 14 Dec 2014 18:44:39 +0000 |
| Subject: | Re: [PATCH] Consistent type names in error messages | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79639@lists.php.net to get a copy of this message | ||
Hi Kalle,
> On 14 Dec 2014, at 18:41, Kalle Sommer Nielsen <kalle@php.net> wrote:
>
> 2014-12-14 19:35 GMT+01:00 Andrea Faulds <ajf@ajf.me>:
>>
>> I want to change the type names to be consistent, because I think our current inconsistency
>> is confusing. Integers are sometimes ints or integers, but other times longs. Floats are sometimes
>> floats, but other times doubles. If scalar type hints are ever added, then jettisoning the old
>> aliases means we don’t have to add extra reserved words.
>>
>
> You forgot that they can also be 'real', but on a serious manner, I
> don't see any reason not to make the error messages consistent and I
> would say go ahead already.
Aha, yes, I did forget that real is also an alias of float. I suppose this proves my point that all
these aliases are confusing: I can’t even remember them all!
Also, a sidenote: In case someone goes and checks the manual and tells me that is_long() is already
an alias of is_int() and not the other way around, the manual lies. In fact, is_int() is currently
an alias of is_long() in master.
Thanks.
--
Andrea Faulds
http://ajf.me/