Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85939 invoked from network); 16 Mar 2010 00:25:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2010 00:25:54 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.220.215 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.220.215 mail-fx0-f215.google.com Received: from [209.85.220.215] ([209.85.220.215:48103] helo=mail-fx0-f215.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/8C-34010-0FFCE9B4 for ; Mon, 15 Mar 2010 19:25:35 -0500 Received: by fxm7 with SMTP id 7so860017fxm.23 for ; Mon, 15 Mar 2010 17:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=9/6zNx4dH5COThsYTg+tArRSZLhk2tXQ90kE324vY4U=; b=GG5qEMDESUeLwlOkXWcETI5H+FY9n+6F4AcCsr7rqqayFGoGhKXIcEdeom25Z66tQl /D7B0aPiAeYrn0bj4WNTv2knmkEtaV/U7mo5HlANICtrdpylcs0EncutwLkerCCOpt41 2UeEWq3TgpDYTrmkGl3Erktwgz1zoFseomklg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=bqn7Abq0fFghVPUKlsCAI4tZYrMh9GvaYa+z+AgwnTWf7i8OaKdgwy9tPJe8Hi89VB 1hfWuHOIrWsvVQW6puSorg62KMhvBe0BMspRZy9Pvb5/KkRdJcSUvrTWSHOoDYVxJq2g IDzPPxh05WIIJpV0RgV5Ks4kdt5ChNy+qwTvE= MIME-Version: 1.0 Received: by 10.223.29.199 with SMTP id r7mr7540071fac.73.1268699105077; Mon, 15 Mar 2010 17:25:05 -0700 (PDT) Reply-To: RQuadling@googlemail.com In-Reply-To: <201003151643.24381.larry@garfieldtech.com> References: <416155e11003121750o4b1f8e11j4c9124fdaa34a22d@mail.gmail.com> <201003151414.38346.larry@garfieldtech.com> <201003151643.24381.larry@garfieldtech.com> Date: Tue, 16 Mar 2010 00:24:45 +0000 Message-ID: <10845a341003151724y19ed9f4fx9f6d2a4e31cbd710@mail.gmail.com> To: Larry Garfield Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [fw-webservices] Re: [PHP-DEV] RFC - "class underloading" -or- "ancestor overloading" From: rquadling@googlemail.com (Richard Quadling) On 15 March 2010 21:43, Larry Garfield wrote: > On Monday 15 March 2010 03:08:28 pm Nate Gordon wrote: > >> > If there were a syntactic-level support for "wrap this object in this >> > class and pass through any method that isn't redefined", a sort of >> > sideways extends, >> > that would become much simpler. =C2=A0I'm not sure what that would loo= k like, >> > though. >> > >> > Or perhaps this is a good time to revisit the traits proposal from a f= ew >> > months back? >> >> While traits do seem pretty cool, the fundamental problem appears to be >> =C2=A0that Framework X doesn't let me do what I want. =C2=A0Unfortunatel= y that is the >> =C2=A0side effect of using a framework, it does things for you. =C2=A0I = had attempted >> =C2=A0to build a system like this in userland code to dynamically replac= e >> =C2=A0classes in my framework, but scrapped it because I could only see = ways in >> =C2=A0which it would be abused. =C2=A0If someone replaces a class buried= in a >> =C2=A0framework, that modifies some bit of functionality, which is depen= ded on >> =C2=A0by a completely unrelated area of the framework, it could potentia= lly >> =C2=A0cause issues that would be very hard to track down. =C2=A0This sou= nds a lot >> =C2=A0like aspect oriented programming in the ability to completely over= write a >> =C2=A0function with userland code. >> >> I feel like the better solution is to fix the framework to allow the >> flexibility to do what you want in a controlled manner, and not bend the >> language to fix the framework. =C2=A0I don't mean to say that PHP is pro= blem >> =C2=A0free or perfect, but I'm not sure this is the best method to fix t= he >> =C2=A0problem at hand. > > Certainly true; it's not PHP's job to work around framework flaws. =C2=A0= However, if > PHP can make it easier to make frameworks that don't have common flaws, t= hat is > something it can and IMO should do. > > Traits wouldn't fix the issue mentioned here, but might allow the framewo= rk to > be written in a way that doesn't have, or at least ameliorates, these sor= ts of > issues. > > Or perhaps there's a different approach besides traits that would work be= tter. > I dunno. :-) > > --Larry Garfield The ability to "registerASubClassForThisClass" idea (don't know the proper name for this), has certainly worked for me. --=20 ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474= 731 ZOPA : http://uk.zopa.com/member/RQuadling