Re: RE:Class::? - accessing data, no success...
| From: | Kristian Köhntopp | Date: | Wed, 05 Jul 2000 12:56:27 +0000 |
| Subject: | Re: RE:Class::? - accessing data, no success... | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23560@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
> What for? No, I saw examples. I can make you 1001 examples of whatever
> feature could be useful. But why do you *need* it? Why can't you live
> without it?
There is no need at all for class methods and class variables,
PHP is already turing complete. Now that you have references,
you can emulate class methods and class variables for any given
class C by manually creating a class C_Keeper, of which you
create only a single instance, and which you use to implement
all class methods and variables.
Having this as part of the language makes certain things easier
to code. If you are going to modify the PHP object model, you
should stop now, though, and think hard. You should also read
up on Smalltalk and on Objective-C as these are the object
models that make the most sense in a PHP context. You should
have a look at C++, also, to see an object model that is overly
complex, fails to deliver some critical features, and generally
sucks. If you are interested, I can provide you with some
information on that, but I won't rant about C++ unasked here.
Only after having decided on a sensible object model for PHP
we should go and implement more, to avoid confusion in the
language.
Kristian
--
Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel
Tel: +49 431 386 436 00, Fax: +49 431 386 435 99
Using PHP3? See our web development library at http://phplib.netuse.de/