Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78296 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73398 invoked from network); 24 Oct 2014 09:29:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2014 09:29:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:54585] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/91-62277-20C1A445 for ; Fri, 24 Oct 2014 05:29:40 -0400 Received: by mail-wg0-f42.google.com with SMTP id z12so654326wgg.25 for ; Fri, 24 Oct 2014 02:29:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=93UTzt/Te2PBDmheDDmlK6iy0EFoPoYNnjUmfEcRE8M=; b=Lrfg/MjGXc0Jj4j1lIw9+lOykKKaItxXFtNVnbpp0F1jbuZwf+Nf5VVCeFTmpDUYjy aGqp37ckbklxhP+dagBBHi2fKN7KcAqX5Z1l8kC0p4SkgEZljxBpHUN+JF/wia8tysYV rawz9kA251UNu135gPLtODUWOOnJ37TDedHLBvhesVWQEM0N/6Yup2Oz2LJ4rVVhAvor lMU7OP9BRW33/K4hbCoVJ1v/nLLQPAaQT1Jxwhcp/mVGyMJGSJbs/JAZ5QpBxlbNlRr6 6fY94T5U3a0dkqAhxCqCRHPa0oBvX8sRkiDRXaJOQDWJKvSz1mqECaDrOH/K44wbdCvY +a1w== X-Gm-Message-State: ALoCoQkT0K2rvTLTUEtpfLNGk15eqkITTs6JOp17i8taeJ6EzNPWTnc/lybgLkxRGi05sMvXjltc X-Received: by 10.194.203.201 with SMTP id ks9mr1830958wjc.105.1414142976215; Fri, 24 Oct 2014 02:29:36 -0700 (PDT) Received: from [192.168.1.9] ([81.80.225.12]) by mx.google.com with ESMTPSA id t16sm4952230wjr.44.2014.10.24.02.29.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 02:29:35 -0700 (PDT) Message-ID: <544A1BF5.3090708@seld.be> Date: Fri, 24 Oct 2014 10:29:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> In-Reply-To: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Readonly Properties From: j.boggiano@seld.be (Jordi Boggiano) On 24/10/2014 00:36, Andrea Faulds wrote: > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties > that makes them readable and writeable from different scopes. > > Since I am a big proponent of including specification patches in new > RFCs, I have decided to put my money (or rather, time) where my mouth > is and I have actually written a specification patch before writing > an RFC. I would love to see this become the new standard for RFCs > affecting the language. Thanks for the work (again). It's an interesting small idea but I'd much prefer revisiting the original getter/setter RFC [1] which had a majority but just fell short of the 66% mark. This RFC only implements parts of the getter/setter functionality (readonly properties) but it does not address the fact that sometimes you want to add logic to a setter or a getter and if you don't have language level getters/setters you end up having to change the interface of the object from a public property to a getFoo/setFoo pair. This leads to everyone having getFoo/setFoo by default just to avoid interface changes or mixed interfaces of public properties and setFoo. [1] https://wiki.php.net/rfc/propertygetsetsyntax-v1.2 Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi