Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20225 invoked from network); 3 Jun 2013 16:55:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2013 16:55:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:56421] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/44-21406-97ACCA15 for ; Mon, 03 Jun 2013 12:55:21 -0400 Received: by mail-ob0-f174.google.com with SMTP id wd20so7637221obb.33 for ; Mon, 03 Jun 2013 09:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JM5Iq6675BB/gq3MJWbeY53h4MxPq+Ry7S4xFxbeZEI=; b=NtN4FSrMWzHPam1CfqUbUsieEms8uH/n2NoOBw+wUpuDfnJzPTJupT+QEPCRYOe1eO JjsIAusBoH+gfEOyc1K4AGiKWsHHOE1oza1Bpms/br6jKo2pLY8rR3XrcLcZ8j1VL89E Ggn7EZi314WJIiQs6GPyzCqDBkjCJ4JFM9l2GhFky0tgZjQUcuTDLXnFrqrVZ38WWxdp ww348ZHee9yjHG7VBXcG3WG+bAg+S00pJBMluwvylhlQQlWgl6tsxtlMlrxA7cDW4BYV /I+y3LMMS4jrxCXdGst3Tjh3pwGV6A+gPwvary6gzP83Ql6HpLVna4iB+8gmsx0q+1gN 84cw== MIME-Version: 1.0 X-Received: by 10.60.68.13 with SMTP id r13mr1402048oet.71.1370278517899; Mon, 03 Jun 2013 09:55:17 -0700 (PDT) Received: by 10.182.165.132 with HTTP; Mon, 3 Jun 2013 09:55:17 -0700 (PDT) In-Reply-To: References: Date: Mon, 3 Jun 2013 18:55:17 +0200 Message-ID: To: Richard Quadling Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11331a764dd2bd04de42d453 Subject: Re: [PHP-DEV] Random Monday thought. From: nikita.ppv@gmail.com (Nikita Popov) --001a11331a764dd2bd04de42d453 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 3, 2013 at 6:49 PM, Richard Quadling wrote: > Hi. > > Recently the setters/getters rfc was declined. > > Other than the vote, was there any technical reasons? > > I've been sitting here and had a thought. > > Currently, if I use ... > > class some_base_class {} > ?> > > I can, sort of, think of this as ... > > class some_base_class extends \stdClass {} > ?> > > in as much as \stdClass has no constants, properties or methods. In fact, > no behaviour at all. > > Now, could it be possible that I could have another PHP maintained base > class or interface that DID support setters/getters? > > So, I would have to make the decision at develop time ... > > class some_base_class extends \stdClassThatHasSetterGetterSupport {} > ?> > > sort of thing. > > So, for classes NOT extending \stdClassThatHasSetterGetterSupport, the > variable/property handling to be used is the original style. > > But for those base classes that do extend from > \stdClassThatHasSetterGetterSupport, then these would have property > support. > > > Is this even possible/feasible? > > Whilst the vote went against the initial rfc, I'm happy to accept that > (though I wish it had passed as I like the black boxing and the semantic > cleanliness it would provide - IMHO). > > > To me, if the internals operated as ... > > class \stdClassThatHasSetterGetterSupport extends \stdClass {} > ?> > > add if that was enough to enable setters/getters, then COULD this be a way > forward for PHP supporting new functionality without breaking base > functionality? > > In essence, turning PHP's internals into a sort of OOP framework. > > Regards, > > Richard. > PHP does not support multiple inheritance. So no, this doesn't solve really the issue. Nikita --001a11331a764dd2bd04de42d453--