What was the result of this discussion?

Thanks

On 27 Oct 2004, at 12:50, Andi Gutmans wrote:

At 10:53 AM 10/27/2004 +0200, Christian Schneider wrote:
Marcus Boerger wrote:
So for now the only addition we may probably consider for 5.1 is
adding 4: optional typehinted values that default to null and only
null.

Please don't add another parameter syntax (especially with line-noi... err special characters) like [BaseClass]. This would make PHP more unreadable than it needs to be for a minor feature. To allow foo(BaseClass $objA = null) to also accept foo(null); handles the few cases where you want to pass null nicely IMHO.


Advocating to only change the PHP syntax to simplify it,

Yeah I tend to agree. Adding [] for a not that popular case seems not to be worth it. It just adds more complexity to the syntax.
I suggest to either leave as is or to support default values of NULL (only) and if that is given then you may also pass NULL (give it a double meaning).

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



Reply via email to