Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91613 invoked by uid 1010); 3 Feb 2005 19:48:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91597 invoked from network); 3 Feb 2005 19:48:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2005 19:48:15 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:57355] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id FB/A8-10528-EFF72024 for ; Thu, 03 Feb 2005 14:48:14 -0500 Received: (qmail 1051 invoked from network); 3 Feb 2005 19:48:11 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 3 Feb 2005 19:48:11 -0000 Date: Thu, 3 Feb 2005 21:48:11 +0200 (IST) X-X-Sender: frodo@shire.zend.office To: =?iso-8859-1?Q?Terje_Sletteb=F8?= cc: internals@lists.php.net In-Reply-To: <00dd01c50a22$523a3780$0300000a@pc> Message-ID: References: <00dd01c50a22$523a3780$0300000a@pc> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PHP 5.1 From: stas@zend.com (Stanislav Malyshev) TS>>across, given what what operator overloading is about). As I've pointed out TS>>in other postings in this thread, operator overloading is about much more TS>>than "just" "syntactic sugar". In C++, for example, it enables important I think you did not succeed in proving this point. You keep bringing examples of how useful it is in C++ - which can be interesting to debate, but is entirely irrelevant to PHP, since PHP is different from C++ on many levels and tasks that are solved with operators in C++ often even not exist in PHP (like "smart pointers", etc.). I still fail to see how it can be really useful - in terms of making something that was very hard to do before easy to do now - beyond they syntax sugar value. TS>>things such as function objects (being able to pass an object to a function, TS>>for example, and have it behave as a function, enabling functional TS>>programming, as well). This is not possible (possibly without jumping TS>>through major hoops) in PHP. Surely it is. Via __call, for example, which is no worse than operator(). Yes, you could not write it the same syntax as C++ - so what? TS>>However, I see from this and other threads, that there's not much chance of TS>>evolution of PHP to support more "advanced" features (which are common in There's a lot of chance for PHP to evolve, but if you mean by it that any feature that you might like would be in without scrutiny - yes, there's little chance for that. TS>>other scripting languages, as mentioned). It seems basic OO support is about TS>>the only thing the PHP community can handle when it comes to expressiveness TS>>in the language. Oh, well. It means you probably won't see in PHP every feature that your favorite other language has. So what? Your favorite other language probably doesn't have all the features of PHP. The new features for PHP should be checked if they are good for PHP and can be implemented consistently and efficiently in PHP. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115