Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74930 invoked from network); 24 Oct 2014 09:34:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2014 09:34:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.182 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.182 mail-qc0-f182.google.com Received: from [209.85.216.182] ([209.85.216.182:48264] helo=mail-qc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/F1-62277-02D1A445 for ; Fri, 24 Oct 2014 05:34:24 -0400 Received: by mail-qc0-f182.google.com with SMTP id m20so355138qcx.27 for ; Fri, 24 Oct 2014 02:34:21 -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:content-transfer-encoding; bh=Dut2AmvQCsa9sOzHNiQ+hvKGsd5Vpavzawjqwe/COGw=; b=HhlDvnhpXqGh9T3c7xKvpKQtaz2lfyAnsQYi6qBn4eU1sB8GBMTpUhuXpnrR4LOhMB dwvPTjEHn/poyb//t72BdAqkwZbK7zPoIXRMxoKBx7lQ6FadUxGtvW1brdRf+Lkigdem VBUijvtG/cW/EibI2bs8OGHQOVItkl0lqNIRpcnqq6swaUwVH5sjhURZDCUDUbnvbGd7 qKvE5HiFlavhxZNvgU9acb6qVExriXdOHOT4v3drW0bjBV85l8RkOR1EIAf4Nh7MMmRU IQyJ6BgzDw6CU9UZVEl55Ef7sE2iMh5lKoVnxRKR5xwGftQeRYPVO4G1BL+q4g0hKVm0 TJHg== MIME-Version: 1.0 X-Received: by 10.170.190.16 with SMTP id h16mr4942674yke.32.1414143261543; Fri, 24 Oct 2014 02:34:21 -0700 (PDT) Received: by 10.140.22.52 with HTTP; Fri, 24 Oct 2014 02:34:21 -0700 (PDT) In-Reply-To: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> References: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> Date: Fri, 24 Oct 2014 16:34:21 +0700 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Readonly Properties From: pierre.php@gmail.com (Pierre Joye) hi Andrea, On Fri, Oct 24, 2014 at 6:36 AM, Andrea Faulds wrote: > Good evening once again, > > Here=E2=80=99s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties tha= t 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. > > If you are curious at all about the behaviour, I suggest perusing the fai= rly comprehensive set of twelve tests included in the main patch to php-src= . As much i really like the idea to have better properties management in PHP I see this RFC as an attempt to solve only part of the problem while dropping most of the other ideas implemented in the past RFCs. My take on that is that some will vote no, or won't like the idea of adding anything in this area. Making compromises and implement partial solutions will only delay the implementation of the complete solution. Many of us agree that __get/__set is a pain to deal with.The need of readonly, writeonly or properties with some logic to define or get a value is a lond due need. Many other languages support that out of the box since long already. Past RFCs, like the c# one, proposed that. I would rather focus on trying to find an acceptable syntax and implementation instead of doing baby steps like that. Baby steps work very well for scalar type hinting, solving one issue after another, etc. But for properties we are at the risk of hainvg a serie of separate RFCs solving the properties management problems in different ways bringing even more troubles and inconsistencies. Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org