Hi!

> "Too much magic"? It's completely consistent with how method parameters
> work now. In fact, I'd argue that introducing a new syntax for this
> would be inconsistent with the current paradigm.

But this in for methods, and you are putting it into entirely different
place - property initializer. That's what I call magic - somehow
property initializer magically becomes method parameter's default value.

> This becomes especially true if initializers are added, where the
> property would be initialized to a non-null value. Hence adding the
> ability for it to *never* actually *be* null in the first place...

I think property initializers won't work well, especially combined with
this syntax. What should public DateTime $foo = 42; produce?

Essentially it looks like the only initializer useful here would be
NULL. In this case, why not just make it simple and always allow NULL
there and get rid of the confusing syntax? You'd have to allow NULL
anyway since otherwise you'd be unable to implement unset() and won't
have any useful isset(). In fact, initial value of any object property
will always be NULL, so not allowing NULL is pointless as there's always
NULL there when you start.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to