Hello,

2011/8/8 Johannes Schlüter <johan...@schlueters.de>:
> On Mon, 2011-08-08 at 09:16 +0200, Ivan Enderlin @ Hoa wrote:
>> Hi Internals,
>>
>> I would like to suggest you a new feature (for PHP5.4 or maybe next).
>> The idea is to implement the \Countable interface into closures to
>> easily count the arguments number.
>
> NO!
> One could add a getParmNo() or such if really needed while I think
> reflection is better (as it also gives parameter information about
> required/optional and type "hints")
>
> Countable implies ArrayAccess or such.

I don't believe Countable implies ArrayAccess, but I do think that
Countable should only be implemented in cases where it is obvious what
it will return, for example collections.

In this case, count(Closure) is really not that explicit, I'd rather
have an explicit method.

Best,

>
> johannes
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Etienne Kneuss
http://www.colder.ch

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to