Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14567 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67929 invoked by uid 1010); 3 Feb 2005 12:00:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67884 invoked from network); 3 Feb 2005 12:00:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2005 12:00:20 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:43808] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 57/04-29932-25212024 for ; Thu, 03 Feb 2005 07:00:19 -0500 Received: (qmail 30850 invoked from network); 3 Feb 2005 11:00:13 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 3 Feb 2005 11:00:13 -0000 Date: Thu, 3 Feb 2005 13:00:13 +0200 (IST) X-X-Sender: frodo@shire.zend.office To: Sebastian Bergmann cc: internals@lists.php.net In-Reply-To: Message-ID: References: <5.1.0.14.2.20050201111730.0299da70@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PHP 5.1 From: stas@zend.com (Stanislav Malyshev) SB>> patch [1] by Johannes Schl?ter that has been floating around for a SB>> while? 1. I personally don't think operator overloading is a good idea. It doesn't add you anything you couldn't do without it the same way - it's pure syntax sugar. And it really ruins the readability of the code - go figure what $i++ means now, in absence of any type delcarations. 2. The referenced patch raises doubts - why it allows to override / but not %, for example? What with all other operators? Why add would work as $foo + 1, but 1 + $foo won't? Will + be non-commutative operation from now on? What with assign-ops - it would leak memory in this case? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115