RE: [PHP-DEV] parent_ctor()

From: Date: Mon, 17 Jul 2000 14:46:26 +0000
Subject: RE: [PHP-DEV] parent_ctor()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24770@lists.php.net to get a copy of this message
Hi, > I understand the desire for a full OO language... but possibly PHP > ain't it. And why is that, generally speaking OO isn't slower than arrays or the likes, doing some simple testing with multi-dimensional arrays that were indexed like array[parentid][itemid][] contra objectparent containing arr[] of objectitem, found that the OO way took 0.2 secs less when it had to fill out around 100 or so parentids, that's a 25% speed increase done with a rewrite that took 3-4 hours... I don't see why PHP shouldnt move onto becoming a more OO programming/scripting language. Now wether that's going to happen or not is another question. > As Kristian pointed out, turning PHP into a proper OO language is going > to require some serious (re)thinking of how PHP does things.... Maybe > in V5 there may be something, who knows. Yes, who knows, and that's the problem. I for one will most likely have to start the project that I'd loved to do in PHP, in java simply because it supports more OO features, and has a better OO implementation (at least feature wise) than PHP. And that IMHO is sad, esp. considering all the good things that PHP has. > Also, the need is not there. 95% of PHP is used to create HTML pages > for viewing in a browser, the script is in memory for a blink of an > eye, and there is no state to be kept between invocations. Contrast > this to a standard Java or C++ application, that needs to run for ever > and hold and manipulate state. In this situation the complexity > requires OO designs. Yes, but code managability and reuse is also a good point when using OO; it doesnt need to be complicated at all, small apps can be made with OOP just as easily as with non-OOP, but you will find it alot easier to extend and integrate the OO version than the other one. And it's not like bigger projects shouldnt be done in PHP, afterall a simple treestructure, or a shopping solution can be much easier when done in OOP, aswell as complete e-business solutions integrating proprietary economy systems and so on. Saying that just because these are on the web, means that they shouldn't be done in OOP is imho, plain wrong. At least that's what I have found, and I am sure some other people will agree with me. Kind regards, David Hjortsoe.

« previous php.dev (#24770) next »