Re: New package: Functional PHP
| From: | Lars Strojny | Date: | Fri, 10 Jun 2011 10:46:00 +0000 |
| Subject: | Re: New package: Functional PHP | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8340@lists.php.net to get a copy of this message | ||
Hi Richard,
Am 10.06.11 11:19 schrieb "Richard Quadling" unter <rquadling@gmail.com>:
>So now I can almost write Javascript code in PHP. Add the JSONy logic
>and soon I won't know where I'm working, what I'm writing or anything.
>
>Sounds great! Bring it on.
Glad you like it.
>One word. Can all the iterators please supply both key/index and value.
Iterators always get passed value, key, collection.
>One thing I fall foul of with PHP's built-in array functions is that
>some of those that use callbacks will supply the value and key and
>other only the value to the callback.
Consistency was really important for me. So given that 90% will only do
something with the value, it should come first.
>Should always be both in my mind. Even if that arrays as an array
>rather than 2 parameters.
[...]
With regards,
Lars