At 12:38 09/04/2002, Kristian Koehntopp wrote:
>On Tue, Apr 09, 2002 at 12:23:57PM +0300, Zeev Suraski wrote:
> > For the record, the advantages and disadvantages of variable name
> > constructors were clear from day one,
>
>Nonetheless they were seriously broken in PHP 3,
How? I really don't remember any differences in the design between 3 and
4, but it's been a long time :)
> and
>
>class __get {
> function __get() {
> echo "I am a constructor\n";
> }
>}
>
>class Bomb extends __get {
>}
>
>overload("Bomb");
>
>$bang = new Bomb;
>
>still stands.
Well then, it would have been a problem introduced by overload(), not
variable named constructors... It could easily be designed to use
__get_Bomb() or __get__get() or whatever.
Besides, this kind of 'bomb' is not very problematic IMHO. Keywords, be
this a language keyword or a keyword implemented by some module (like
overload) will often bring special cases which don't work. How about class
parent {}, or class super {} in Java? It's not considered to be a real
world problem.
Zeev
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php