Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3813 invoked by uid 1010); 2 Aug 2006 13:49:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3791 invoked from network); 2 Aug 2006 13:49:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 13:49:10 -0000 X-PHP-List-Original-Sender: hartmut@php.net X-Host-Fingerprint: 213.136.52.68 mailgate-out2.mysql.com Linux 2.5 (sometimes 2.4) (4) Received: from ([213.136.52.68:34607] helo=mailgate.mysql.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id A5/24-45114-9DCA0D44 for ; Wed, 02 Aug 2006 09:47:07 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.4/8.13.4) with ESMTP id k72Dkwxt004316; Wed, 2 Aug 2006 15:46:58 +0200 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 03820-02; Wed, 2 Aug 2006 15:46:57 +0200 (CEST) Received: from [10.100.64.53] (10-100-64-53.mysql.internal [10.100.64.53]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id k72DkoCX004894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Aug 2006 15:46:51 +0200 Message-ID: <44D0ACC2.4000207@php.net> Date: Wed, 02 Aug 2006 15:46:42 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 To: RQuadling@googlemail.com, internals@lists.php.net References: <1154478748.6599.16.camel@blobule> <5D.33.45114.9A960D44@pb1.pair.com> <44D07EDE.4030001@mysql.com> <10845a340608020444g79e1da83vdf1cc27ae9ae183d@mail.gmail.com> <44D09085.3000906@mysql.com> <10845a340608020551v6624a344k2e9ec42d099c81bb@mail.gmail.com> <44D0A104.7040805@mysql.com> <10845a340608020623r1878025eldb9b6dccf584a22b@mail.gmail.com> In-Reply-To: <10845a340608020623r1878025eldb9b6dccf584a22b@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: hartmut@php.net (Hartmut Holzgraefe) Richard Quadling wrote: >> On 02/08/06, Hartmut Holzgraefe wrote: >> Is function overloading really "an OOP thing"? > I think so, I've only ever used it within Delphi, so my POV may be skew= ed. proving by example? ;) > To quote http://www.codeproject.com/soap/RefAndOL.asp "For a language > to be said .NET complaint, it should be truly object oriented and > therefore must support polymorphism. Method overloading is one of the > pillars of polymorphism. Overloading means methods with the same name > but different parameters. Just as we overload methods in regular > applications, we can overload XML WebMethods also." >=20 > I've always considered it to be the case. You are mixing concepts here. Yes, function overloading is crucial to polymorphism. And OO languages usually heavily rely on polymorphism. But does that make polymorphism an OO feature? Polymorphism does exist outside the OO world, e.g. in functional languages. Whether it is crucial for OO is a different question ... But even then we have different types of polymorphism to look at. What you are requesting is ad-hoc polymorphism, there are other classes of polymorphism though ... e.g. PHP userland functions without type hints are already polymorph in that they accept any number of arguments of any type. PHP will issue a warning if you call such a function with less parameters than specified in the functions parameter list, but you cann still call it nevertheless. This qualifies as a form of parametric polymorphism which is the other major kind of polymorphism besides ad-hoc polymorphism. PS: your quoting style sucks. please put your answers *below* the question --=20 Hartmut Holzgraefe, Senior Support Engineer . Hauptsitz: MySQL GmbH, Radlkoferstr. 2, D-81373 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Hans von Bell, Kaj Arn=C3=B6 - HRB M=C3=BCnche= n 162140