Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14626 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76382 invoked by uid 1010); 4 Feb 2005 01:00:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76348 invoked from network); 4 Feb 2005 01:00:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2005 01:00:42 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:36507] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 92/C4-05104-139C2024 for ; Thu, 03 Feb 2005 20:00:35 -0500 Received: (qmail 21976 invoked from network); 4 Feb 2005 01:00:28 -0000 Received: from localhost (HELO andi-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 4 Feb 2005 01:00:28 -0000 Message-ID: <5.1.0.14.2.20050203165927.026f1b30@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 03 Feb 2005 17:00:26 -0800 To: Derick Rethans , Sebastian Bergmann Cc: internals@lists.php.net In-Reply-To: References: <5.1.0.14.2.20050201111730.0299da70@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] PHP 5.1 From: andi@zend.com (Andi Gutmans) At 11:23 AM 2/3/2005 +0100, Derick Rethans wrote: >On Thu, 3 Feb 2005, Sebastian Bergmann wrote: > > > Derick Rethans wrote: > > > This adds operator overloading to user classes? > > > > Yes, have a look at Johannes' Complex example [1]. > >Okay, mega Yuck then. Although it looks cool, I consider it as a bad >practise. It confuses the hell out of people that they can add two >objects. Use C++/Java if you want this... BTW, in general Java also decided that it sucks. Except for + which is a bit magical it also requires to use verbose methods. This is a big time/life saver because operator overloading is very confusing and obscure. I think it's only nice in theory and not in real world usage. Andi