Re: Re: Flexible type hinting
| From: | Rodrigo Saboya | Date: | Fri, 03 Jul 2009 14:15:33 +0000 |
| Subject: | Re: Re: Flexible type hinting | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44684@lists.php.net to get a copy of this message | ||
Ford, Mike wrote:
I had thought about having "weak" and "strong' type checking even before Paul sent his proposal, but I rejected the idea myself for the confusion it might cause because I couln't think of a good syntax. This one actually looks pretty good, it's intuitive and consistent with what the language offers now. Big +1 regards Rodrigo Saboyafunction func(int $i)for strict type checking, andfunction func((int)$i)for coercion aka casting (although now I've seen it written down I'm not so sure! ;).