Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67572 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7635 invoked from network); 28 May 2013 06:15:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2013 06:15:13 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.172 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.172 mail-ie0-f172.google.com Received: from [209.85.223.172] ([209.85.223.172:55200] helo=mail-ie0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/C9-44058-F6B44A15 for ; Tue, 28 May 2013 02:15:12 -0400 Received: by mail-ie0-f172.google.com with SMTP id 16so20434593iea.31 for ; Mon, 27 May 2013 23:15:09 -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 :content-type; bh=5R8hz2GVM/oIfSDWZPzdJveVlwph6/fHrvQKlPcnB8s=; b=UtC1GzO+u9UGP8hCilxYh0+nHy3X3i4rgAjvQfX5I+zsWJbACvrBuUvcXTWAcPSpWo Boc0YQOGWnpb/tg5CvGZmrHVxpN9jDwFSrAYHumN3x4KF9MClXA1EqyvSrOju5OSYRAO XOJHdetk6NypYXvJjlEupiRbAvyB1/6/57mmr0ypsUa7EeD6i4IHrcpKOnEpeeEOD0tM n1c1yne76wC5ek7auj14edt5V4UEVa/Y9pWOoCT7E4yNlK6Y8zRWI7VjVZG210wRzMz6 qWuAvFWYg2ipf09SbA9sqo+2PDnAzS3m/Cm9ITPwi4uiKFA7vgnH2aDb46xC8ToH1u98 MPlQ== MIME-Version: 1.0 X-Received: by 10.43.158.3 with SMTP id ls3mr18466368icc.55.1369721709139; Mon, 27 May 2013 23:15:09 -0700 (PDT) Received: by 10.50.209.3 with HTTP; Mon, 27 May 2013 23:15:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 28 May 2013 08:15:09 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a11c231caea1f1904ddc12f63 Subject: Re: supporting the final keyword for properties From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c231caea1f1904ddc12f63 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote: > Hi, > > The recent > http://www.mail-archive.com/internals@lists.php.net/msg59301.html discuss= ion > made me wonder why did we decide not supporting the final keywords for > properties as it would provide an easy way for read-only attributes (cons= t > would be a better choice in performance wise, but then you can only set i= t > in your declaration where no dynamic expression is allowed.) > > I would like it to work the same way as it does in java( > http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.4) > eg. you can set the initial value either in the declaration or later on, > but after it is set, you can't change it, trying to do that would create = a > recoverable fatal error (or throwing an exception which extends > RuntimeException). > > What do you think? Would this be viable? Is there any still-present reaso= n > why we shouldn't support that? > > -- > Ferenc Kov=C3=A1cs > @Tyr43l - http://tyrael.hu > the accessors rfc got rejected, so I'm bringing this up again. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c231caea1f1904ddc12f63--