Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25128 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84225 invoked by uid 1010); 2 Aug 2006 13:38:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 84210 invoked from network); 2 Aug 2006 13:38:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 13:38:37 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.166.182 py-out-1112.google.com Linux 2.4/2.6 Received: from ([64.233.166.182:33871] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 50/AF-45114-471A0D44 for ; Wed, 02 Aug 2006 08:58:29 -0400 Received: by py-out-1112.google.com with SMTP id n25so1549440pyg for ; Wed, 02 Aug 2006 05:58:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ubR/GBic6ZqC5ahwK5ZxkP9BIwSVT4eEV1MK/wAUjfPpZG9Rn4rnr/+Ksimr881HiTFDafb9e1kPXdWWZDU6SDfl58COr3hCtolANhJJR3mZE7zj9DaMwSgEFvfetJD2TPJVoh1sqDoTKzBa+lTLheK32DPOkiSx///9hy+FRBA= Received: by 10.35.78.13 with SMTP id f13mr1417403pyl; Wed, 02 Aug 2006 05:58:26 -0700 (PDT) Received: by 10.35.93.18 with HTTP; Wed, 2 Aug 2006 05:58:26 -0700 (PDT) Message-ID: <10845a340608020558t409cbef2i33819ade9334840a@mail.gmail.com> Date: Wed, 2 Aug 2006 13:58:26 +0100 Reply-To: RQuadling@GoogleMail.com To: internals@lists.php.net Cc: "Lukas Smith" , "Zeev Suraski" In-Reply-To: <7.0.1.0.2.20060802153423.0d046278@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <18810497049.20060801234124@marcus-boerger.de> <1154478748.6599.16.camel@blobule> <16.85.45114.FF370D44@pb1.pair.com> <7.0.1.0.2.20060802153423.0d046278@zend.com> Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: rquadling@googlemail.com ("Richard Quadling") I suppose it could be argued that if you want parameter overloading, then don't declare any parameters to the method and use func_get_args(). This WOULD give the userland code the appearance of parameter overloading. (I'm sure that this was mentioned). But I remember that there where "issues" with func_get_args (sorry - not really sure what they were). But, with regards to the original topic "rethink OO inheritence strictness", this DOES seem that PHP is forcing userland code to obey 1 rule rather than allowing the user to extend as they see fit. On 02/08/06, Zeev Suraski wrote: > I actually think this can be on a per method basis, so that methods > where it's strictly required (such as certain magic method as Marcus > said) will be able to set it, without affecting the entire > class. It's at the method level that the developer knows whether > overriding methods must adhere to the same signature. > > > My recommendation: > - Add a new flag to methods (at the implementation level) that will > allow to flag them as 'strict' > - In case such a strict method is improperly overridden - error out (E_ERROR) > - In case a non-strict method is improperly overridden - emit E_STRICT > - Consider adding userland ability to set entire classes or methods as strict > > Most people who use 'strict OO' will have E_STRICT enabled and have > their code E_STRICT clean, so providing userland support for tagging > classes/methods as strict is probably not really necessary. > > Zeev > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"