Re: [patch] Late static bindings (LSB)
| From: | Michael Lively | Date: | Mon, 24 Sep 2007 02:27:42 +0000 |
| Subject: | Re: [patch] Late static bindings (LSB) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32430@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Stanislav Malyshev" <stas@zend.com>
To: "Baptiste Autin" <fjas@free.fr>
Cc: "'Zoe Slattery'" <zoe.slattery@googlemail.com>; "'Dmitry Stogov'" <dmitry@zend.com>; "'Marcus Boerger'" <helly@php.net>; "'Lukas Kahwe Smith'" <mls@pooteeweet.org>; "'Michael Lively'" <m@digitalsandwich.com>; "'Etienne Kneuss'" <colder@php.net>; <internals@lists.php.net>; "'Andi Gutmans'" <andi@zend.com>
Sent: Sunday, September 23, 2007 3:39 PM
Subject: Re: [PHP-DEV] [patch] Late static bindings (LSB)
The only languages I have seen that allow things like this seem to trend more towards prototype based languages. Though it may very well be that I don't know what terminology to look for. The very phrase late static binding is an oxymoron of sorts :). In any case I do want to be sure to say that just because the exact concept is lacking in Java and C++ that is not a reason to discount it entirely.Couldn't I write: isset(static::$structure) ?You could, but that's only runtime. People generally prefer compile-time control which is derived from definition rather than per-instance runtime control (implementing interface vs. checking each time if class has certain methods).So this will be my very last (and so much naïve) question: do you know how people cope with it in other OO languages?AFAIK there are not many languages which allow you to do non-static static calls... I see no way of doing it in Java or C++ - please correct me if I'm wrong.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.13.30/1025 - Release Date: 9/23/2007 1:53 PM