Re: Re: [RFC] Reserving More Types in PHP 7
| From: | Andrey Andreev | Date: | Fri, 20 Feb 2015 11:21:45 +0000 |
| Subject: | Re: Re: [RFC] Reserving More Types in PHP 7 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83288@lists.php.net to get a copy of this message | ||
Hi,
On Fri, Feb 20, 2015 at 6:01 AM, François Laupretre <francois@php.net> wrote:
> Hi Levi,
>
> Just my opinion :
>
> Add 'resource', 'object', 'scalar', 'mixed',
> 'numeric'
>
> 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 !
>
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.
Cheers,
Andrey.