On Fri, Feb 20, 2015 at 4:21 AM, Andrey Andreev <n...@devilix.net> wrote:
> On Fri, Feb 20, 2015 at 6:01 AM, François Laupretre <franc...@php.net> wrote:
>> Add 'resource', 'object', 'scalar', 'mixed', 'numeric'

If someone wants to reserve these I will leave them up to another RFC,
as I suspect they are more controversial than what I have proposed.

>> Remove 'double' (avoid this alias if we decide to encourage 'float' 
>> everywhere)
>>
>> Not sure we'll use Boolean and integer but reserve also.
>>
>> Hope 'null', 'true', and 'false' can technically be used as type hints. If 
>> not, bad news, especially for null. Love 'int|false' as return type !

This is out of scope for this RFC, but if this RFC passes they would
be reserved which means this *could* be done without BC breaks in the
future.

> I'd rather not reserve 'resource'. Such a hint may be useful in the
> short term, but there already are plans to turn the current resources
> into objects, and with the rise of REST lately it is also an obvious
> base class/interface/trait name.
>
> Agree on 'double' though ... if we want to discourage its usage, we
> might even think of deprecating it.

While deprecating it might be a good course of action, it is out of
scope of this RFC. I personally think that reserving it is a good way
to discourage its use: simply reserve it and then don't use it for
anything. If we decide not to use the aliases if we have scalar types
and the aliases are reserved this would prevent users from making
custom types from the aliases. In my opinion this a Good Thing.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to