On 07.04.2008, at 18:57, Stanislav Malyshev wrote:
Hi!
I just ran into this (IMHO unnecessary) limitation with array_reduce:
Why should it only reduce to an int? Why not a string or an array? I
plan on submitting a patch for PHP 6 to allow other types too.
I'm not sure I understand - how array_reduce is related to having
type hints? You could make array_reduce to do additional things, but
that doesn't require introducing strong typing into php.
PHP should be as flexible about types as possible. I never used
array_reduce() so I do not know its history. But some of you might
remember the change in behavior from array_merge() which was the
result of a switch to a more strict parameter parsing API, which now
returns false when you pass in NULL. A fair amount of people believe
that this is the wrong direction to take. Continuously expanding type
hints relates to this concern.
regards,
Lukas
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php