Re: PHP 5.1

From: Date: Thu, 03 Feb 2005 12:21:02 +0000
Subject: Re: PHP 5.1
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-14568@lists.php.net to get a copy of this message
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

« previous php.internals (#14568) next »