RE: [PHP-DEV] [PATCH] Late Static Binding

From: Date: Thu, 02 Mar 2006 07:20:39 +0000
Subject: RE: [PHP-DEV] [PATCH] Late Static Binding
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-22073@lists.php.net to get a copy of this message
> -----Original Message----- > From: Andi Gutmans [mailto:andi@zend.com] > Sent: Thursday, March 02, 2006 5:51 AM > To: Dmitry Stogov; 'Marcus Boerger'; 'Mike Lively' > Cc: 'PHP-DEV' > Subject: RE: [PHP-DEV] [PATCH] Late Static Binding > > > At 06:37 AM 3/1/2006, Dmitry Stogov wrote: > >1) I would very like to see some real example where "static" is > >necessary? > > It's needed when you implement a convention based system where the > name of the Class has a meaning. For example in an OORDBMS mapping > system, the name of the class could be the table name. > > >2) "static" is really bad name. I suggest "caller", Marcus thought > >about "class". > > Yeah static is very confusing and I think it's a bad idea. > > I'm trying to think what a non-confusing way would be. Some > ideas would be: > a) using "class" e.g. class::method() > b) change behavior of self:: to always be "virtual" and have people > use class_name::method() > > Any other ideas? static::foo() class::foo() caller::foo() owner::foo() Thanks. Dmitry. > I think we should solve this issue but let's > brainstorm and find the right way, both syntax wise and > implementation wise (without breaking opcode caches). > > Andi > > >

« previous php.internals (#22073) next »