Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61102 invoked by uid 1010); 16 Oct 2007 13:09:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61087 invoked from network); 16 Oct 2007 13:09:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2007 13:09:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=hans.moog@mkj-computing.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=hans.moog@mkj-computing.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mkj-computing.de from 213.239.209.74 cause and error) X-PHP-List-Original-Sender: hans.moog@mkj-computing.de X-Host-Fingerprint: 213.239.209.74 web-002.server-ip.de Linux 2.4/2.6 Received: from [213.239.209.74] ([213.239.209.74:57326] helo=web-002.server-ip.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/74-30952-FF7B4174 for ; Tue, 16 Oct 2007 09:09:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by web-002.server-ip.de (Postfix) with ESMTP id 742987D806A; Tue, 16 Oct 2007 15:07:49 +0200 (CEST) Received: from web-002.server-ip.de ([127.0.0.1]) by localhost (web-002.server-ip.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19577-04; Tue, 16 Oct 2007 15:07:49 +0200 (CEST) Received: from win-001.server-ip.de (static.88-198-106-164.clients.your-server.de [88.198.106.164]) by web-002.server-ip.de (Postfix) with ESMTP id 2AF657D8052; Tue, 16 Oct 2007 15:07:49 +0200 (CEST) Date: Tue, 16 Oct 2007 15:09:14 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C80FF5.C040856D" Message-ID: <7C37FF3A0196094F95430BA95952032201611E@s1.mkj.lan> Content-class: urn:content-classes:message X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: AW: AW: AW: [PHP-DEV] Method overloading by method signature thread-index: AcgP8UjM4v2kh9sPRiWFURqI7sHRpgAAD0QU References: <7C37FF3A0196094F95430BA95952032211B7C5@s1.mkj.lan> <7C37FF3A0196094F95430BA95952032211B7C7@s1.mkj.lan> <72129346.20071014092922@marcus-boerger.de> <7C37FF3A0196094F95430BA95952032211B7CC@s1.mkj.lan> <19939840.20071014231353@marcus-boerger.de> <002f01c80f5b$d645d340$15b2a8c0@unterwegs> <7C37FF3A0196094F95430BA95952032211B7D2@s1.mkj.lan> <4714881F.1030302@cschneid.com> <7C37FF3A0196094F95430BA95952032201611B@s1.mkj.lan> <47149337.9000209@cschneid.com> <7C37FF3A0196094F95430BA95952032201611D@s1.mkj.lan> To: "Lukas Kahwe Smith" , X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mkj-computing.com, mkj-computing.de Subject: RE: AW: AW: AW: [PHP-DEV] Method overloading by method signature From: hans.moog@mkj-computing.de ("Hans Moog") ------_=_NextPart_001_01C80FF5.C040856D Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >The point is that I do not see this feature at all relevant to =20 >solving the web problem. This is where PHP needs to focus. Namespaces =20 >help in solving the web problem, because it eases cooperation of =20 >independent developers to supply libraries. The feature you are =20 >proposing is solved easily in userland (just like named parameters). =20 >Its is a feature I could see using in a heavy lifting language, but =20 >not in a glue language. Where do we draw the line? Somewhere =20 >relatively arbitrary, but my gut tells me that this is a good =20 >candidate to be on "lets leave it out of php" side of the line. > >regards, >Lukas When it comes to interoperation between systems and or developers, it is = always a good idea to define strict standards of how the communication between = libarys and components has to take place (since public methods are something like an interface = bewteen interoperating libraries and classes), to be sure that all components work together as expected. One of the = best approaches to explain the usage of the class to a foreign developer and to be sure = that your class is used correctly and help the foreign developer to understand how your classes = have to be used (beside documentation), is to typehint your parameters. But when you do so, you are no longer able to overload your methods = anymore. Because of this, I think this feature is EXTREMELY relevant to solving the web problem. Not being = able to overload methods anymore is a bad thing since overloaded methods allow to use a class in much = more situations than just being able to use it in one single way. You are not able to tell the developer to use integer OR string values = but NO arrays, booleans, Objects and so on when calling your method. You could mention it in the comment but when he misunderstands the = comment, php doesn't notify him about his error. When using type hinted parameters, php would do so. You are not able to provide strict api's out of the box right now. You = will always have to check the types of the passed parameters manually. ------_=_NextPart_001_01C80FF5.C040856D--