Re: Typehints (was Re: [PHP-DEV] Annoucing PHP 5.4 Alpha 1)
| From: | Josh Davis | Date: | Wed, 11 Aug 2010 00:36:20 +0000 |
| Subject: | Re: Typehints (was Re: [PHP-DEV] Annoucing PHP 5.4 Alpha 1) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49301@lists.php.net to get a copy of this message | ||
On 11 August 2010 02:13, Arvids Godjuks <arvids.godjuks@gmail.com> wrote:
> Remember the main PHP principle? KISS. So keep it, blody hell, simple!
Please try to realize that what you find simple may not appear as
simple to everybody else. To me, typechecking is very simple: if type
equals typehint then ok else error. Very simple. Describing the rules
used when juggling types takes several pages of the PHP manual and
some conversions are undefined. And from what I understand, the
proposed typecasting typehints use slightly different rules. I'm sure
you understand how one could see that as "not simple."