Re: Iterable Type Hint
| From: | Stas Malyshev | Date: | Thu, 12 Jul 2012 16:30:43 +0000 |
| Subject: | Re: Iterable Type Hint | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61170@lists.php.net to get a copy of this message | ||
Hi!
> Would it be worth while adding a new type hint that checks for this
> condition? I'd propose Iterable:
I see more and more multiplication of weird ad-hoc type checks. First we
had "callable", now "traversable", then we invent more and more weird
functional types with complex logic. I don't like this development at
all. It's ad-hoc introducing of half-baked, unstandartized, undesigned
strict typing. Strict typing is not a good idea for PHP, and weird
strict typing based on complex conditions hidden from the user is even
worse IMO.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227