Re: Countable Type Hint
| From: | Craig Duncan | Date: | Sat, 19 Nov 2016 18:42:40 +0000 |
| Subject: | Re: Countable Type Hint | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97072@lists.php.net to get a copy of this message | ||
On 19 November 2016 at 18:36, Stanislav Malyshev <smalyshev@gmail.com>
wrote:
>
> > Should I bring *countable* to RFC?
>
> Nothing prevents one from having such interfaces or classes or traits if
> they need it. I don't see any need of adding more special cases into the
> language. Special cases are always bad design and we shouldn't make it
> worse.
>
Nothing prevents it? As far as I'm aware there's no current way to type
hint Countable or array.
How would one add an interface that includes Countable and arrays?