Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14568 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1755 invoked by uid 1010); 3 Feb 2005 12:21:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1732 invoked by uid 1007); 3 Feb 2005 12:21:00 -0000 To: internals@lists.php.net Date: Thu, 3 Feb 2005 13:21:02 +0100 Message-ID: <20050203132102.56831167@localhost.localdomain> References: <5.1.0.14.2.20050201111730.0299da70@localhost> X-Newsreader: Sylpheed-Claws 1.0.0cvs1.1 (GTK+ 2.4.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Posted-By: 84.154.14.185 Subject: Re: [PHP-DEV] PHP 5.1 From: pierre@dotgeek.org (Pierre-Alain Joye) On Thu, 3 Feb 2005 13:00:13 +0200 (IST) stas@zend.com (Stanislav Malyshev) wrote: > SB>> patch [1] by Johannes Schl?ter that has been floating around > SB>for a> 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. (speaking only for internal needs) I think you are wrong here. Example: d = new date(2005,2,31); d->day++: You are out, no way to know where you are inside the read or write property(ies) functions. That said I agree that userland operators overloading is not a good idea. Regards, --Pierre