Re: Function caching...

From: Date: Sat, 09 Dec 2000 13:03:04 +0000
Subject: Re: Function caching...
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-40644@lists.php.net to get a copy of this message
At 13:38 9/12/2000, Ulf Wendel wrote:
Ron, this is an old discussions. Some think of PHP as the BASIC of the Web, some such as Kristian and me would like to have a little more difficult but also more performant language: (stronger) typed, improved OO features, ...
Primarily, PHP addresses, and will go on answering the goals it was designed to address. What Kristian was suggesting was essentially keeping the syntax (more or less), and going back to the drawing board for all the rest. That's plain wrong. Basing different projects on the same syntax, using the same scripting engine, is a possibility. Breaking the rules of the game and ruining PHP, just so that it addresses the needs of the upper 0.1% of the enterprise market is simply a very bad idea. Improvements to PHP (as in the mainstream Web environment based on the Zend engine) can be made using several approaches: - Improvements that are transparent to the end user. The caching mechanism Zend's coming out with is such an improvement. As I completely disagree with Krisitian that the design of PHP is 'wrong' or 'limited', I don't consider this type of improvement as a cure for a symptom. There are probably other load balancing / resource caching modules that can further improve performance, again, without killing the #1 objective of PHP, which is ease of use and rapid development cycles. - Adding features that people can live very well without, but that those who need them will have them available. The function-result caching mechanism, itself, is fairly dangerous. You suddenly put restrictions on what may be done in the function, and what may not be done. And it's far beyond 'don't use statics'. In order to be perfectly safe, you also mustn't query any external sources (e.g. SQL servers), that might change between the function calls. At any rate, it's not a feature I'd recommend for the average, and even advanced user. It's a function I'd rate as 'Use only if you have a very good idea of what you're doing', and very few functions can safely be used with that sort of output caching functionality. - Adding features that would be beneficial for the entire range of users, or that would at least not seriously hurt users that don't need them. A stronger OO model, for instance, falls into that category, if done right. IMO, Krisitian's idea essentially turns most parts of PHP into 'Use only if you have a very good idea of what you're doing', which is equivalent to shooting PHP in the foot. The trick is to improve performance, without doing that. Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#40644) next »