On 14.04.2008, at 19:49, Christian Schneider wrote:
Am 14.04.2008 um 19:04 schrieb Chris Stockton:
You are missing the point, why be strict on return types, and
liberal on parameters? Be strict
Because IMHO a function can easily specify what it is returning but
should be flexible in what it accepts - that's what a good PHP API
is to me.
Asking for consistency just for the sake of consistency seems wrong
here. Especially when it sends out the message that function
parameters should be (over-)specified to exact types.
Right .. this is so beautiful. So we get type hints for parameters,
then someone starts implements a patch for return types (for
consistency) and goes a bit further than what we already have and
suddenly (for consistency) the parameter type hints need to be
adjusted as well. Err .. what? Who is missing the point here? I think
this illustrates the consistency arguments that are thrown around
since recently quite well.
Either it makes sense or does not make sense in its own right. Do not
use consistency as an excuse to add things. Now we have had this
debate, but I guess it ends up being a fairly non technical debate
about who likes what and who wants PHP to change in what ways .. oh
well .. I give up .. this debate is a horse that is so dead it can
never die anyways.
regards,
Lukas
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php