Re: do_declare_property()
| From: | Kristian Köhntopp | Date: | Thu, 13 Jul 2000 12:27:10 +0000 |
| Subject: | Re: do_declare_property() | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-24435@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
> However, if you'd have the following syntax:
> function foo(class MyObject $obj)
> {
> $obj->bar;
> }
> You could know at compile time if the MyObject class's bar member was
> defined as private.
Doing things at compile time is evil, from
a component developers point of view. In
component systems, I want to be able to delay
as many decisions as possible as long as possible,
in order to allow for a maximum of flexibility
in arranging my components and adding new
(sub-) types of components at runtime.
One of the greatest flaws of C++ is that it
wants to do so many things at compile time.
Many objects systems and extensions have been
written ON TOP of C++'s existing, but inadequate
object system, in order to facilitate component
management at runtime. See the moc (meta object
compiler) of Qt, the MFC and dozens of other
implementations.
Consider this, when you design the PHP object
system: Computers get faster every day, so your
primary design goal should not be effiency (it
should be as fast as necessary, and there should
be ways around it to speed things up), but
flexibility. Flexibility can not be added later,
by spending more on hardware.
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/