Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18318 invoked by uid 1010); 16 Nov 2005 18:54:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18303 invoked from network); 16 Nov 2005 18:54:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 18:54:57 -0000 X-Host-Fingerprint: 64.233.184.199 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.199:29941] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 37/D8-07637-1808B734 for ; Wed, 16 Nov 2005 13:54:57 -0500 Received: by wproxy.gmail.com with SMTP id i24so1536226wra for ; Wed, 16 Nov 2005 10:54:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=H+uSRNJhlnOIpxs02AsMLuOX6g+lBZEdeiCqkcu0x9P1CJQssYpXKUnNzaI13yaiqwifzaBO+AFC6lncoVEGgD9/i6xEpRoZmx1Wbw9opi/gb4oZlpIGdxQX2qBZnMhLc8D5ulcB1K0OrTxaJl7JlJglNVfQLslT3l/fhqcmn+M= Received: by 10.54.76.9 with SMTP id y9mr5464885wra; Wed, 16 Nov 2005 10:54:54 -0800 (PST) Received: by 10.54.76.6 with HTTP; Wed, 16 Nov 2005 10:54:54 -0800 (PST) Message-ID: <4e89b4260511161054s37b7d678i8166a2a6bda2296d@mail.gmail.com> Date: Wed, 16 Nov 2005 13:54:54 -0500 To: Jochem Maas Cc: php internals In-Reply-To: <437B4F37.1010507@iamjochem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <437B4F37.1010507@iamjochem.com> Subject: Re: [PHP-DEV] interface method visibility. From: kingwez@gmail.com (Wez Furlong) An interface is a public contract that describes the behaviour of an object= . If you're not using interfaces in that way, you're doing something fundamentally wrong. --Wez On 11/16/05, Jochem Maas wrote: > why does the engine care about the visibility of interface methods I decl= are? > I understand the argument that interface methods only have 'meaning' when= applied > as public methods of objects - but thats rather academic and personally I= can > think of useful ways to abuse interfaces using protected methods at the v= ery least > why am I not allowed to do this just because someone decided that its not= correct? > > and given that I can implement a non-static method without using $this or= any other symbol/code > related to the instantiated object (effectively creating a static method)= which I can > call using static notation why not allow static interface methods? > > also I noticed that using the keyword 'abstract' with a interface method = declaration > is all of a sudden (5.1RC5dev) causing a fatal error where before (5.0.2 = - 5.0.4) > no error what so ever. > > If 'static', 'protected', 'private' are not allowed with interfaces (very= unpragmatic imho) > then why the fatal errors? why not an E_STRICT and just ignore those decl= aration... especially > because not declaring a method static and leaving off the visibility leav= es you with a > method that is non-static and public - exactly what an interface 'require= s'. > > rgds, > Jochem > > ---- > > some might ask why I am asking - well the motive is quite simple: > > "I try to stay on top of php developments, trying out to the best= of my > abilities new features whenever I see an opportunity. partly for= fun, partly > to be able to encourage/help others to step up to the php5 plate= . lately I > _feel_ I am being punished more and more for trying to keep abre= ast due to BC breaks > (some of which, I realise, are very much required) and more anno= yingly abitrary > changes in behaviour." > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >