Re: Type hinting
| From: | Stas Malyshev | Date: | Mon, 24 May 2010 05:54:07 +0000 |
| Subject: | Re: Type hinting | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48418@lists.php.net to get a copy of this message | ||
Hi!
I see three key options going forward: 1. Implement the table along the lines of what it looks like now, perhaps with minor changes. 2. Implement identical conversion rules to the ones that exist in PHP; That effectively turns type hinting into scalar casting operators (not saying that's a bad thing!) 3. Implement identical conversion rules to the ones that exist in PHP, except for when they really suck. Namely, lose the array->scalar conversions and silent conversions of non-numeric strings to numbers.I'm for 3, Array->scalar must die, as for non-numeric to numbers, I don't have strong opinion as I see no point in it, IMO if it failed, I'd be OK with it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227