RE: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening)
| From: | Zeev Suraski | Date: | Wed, 16 Jul 2014 09:22:54 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75581@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Stas Malyshev [mailto:smalyshev@sugarcrm.com]
> Sent: Tuesday, July 15, 2014 7:14 PM
> To: Rowan Collins; internals@lists.php.net
> Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening)
>
> Hi!
>
> > The answer - which is definitely a matter of opinion - is that
> > allowing any string reduces the usefulness of the type hint.
>
> IMO, having consistent rules is much more, orders of magnitude more
> important than serving any particular use case. We will always have use
> cases
> in which any particular check would not be enough. We should not sacrifice
> the simplicity of the language to try and capture every one of them.
Agreed.
Zeev