Re: parent_ctor()

From: Date: Tue, 18 Jul 2000 16:37:55 +0000
Subject: Re: parent_ctor()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24982@lists.php.net to get a copy of this message
KK>> Of course it does not work in C++, as C++ is statically (compile-time) KK>> typed. settype() is not a problem in dynamically (run-time) typed KK>> languages. Just add the ability to set a "delegate". That's an object yes it is. settype() is a conceptual problem. If you ever need to use it, this is the sign your design is extermely bad (close to non-existent). C++ needs it because they can't do inheritance other way, but we can. KK>> Agreed, settype() should not be needed in a clean design. It KK>> is useful in purposely unclean designs, though. Specifically, I don't really want to be useful in bad design. Also, please define what you want - a tool to do everything or a tool to do good OO? First you bash PHP because it's OO is not clean enough and then you propose method to defy any OO at all. If you need typeless data collections, hashes are at your service. If you need typed data-code bounds, go classes - but they are _typed_, you can just turn around halfway and say "now I want it to be typeless again". That's what I call a messy design. KK>> it is useful in designs where one class must pose as another KK>> class, or any class (the RPC proxy example I keep coming back KK>> to). I do not see what you mean. Why any class should pose as any other class, especially in PHP? -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#24982) next »