RE: [PHP-DEV] [PATCH] Late Static Binding
| From: | Andi Gutmans | Date: | Thu, 02 Mar 2006 02:50:44 +0000 |
| Subject: | RE: [PHP-DEV] [PATCH] Late Static Binding | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-22071@lists.php.net to get a copy of this message | ||
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? 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