Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91148 invoked from network); 16 Jul 2012 13:42:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2012 13:42:24 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:36330] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/E2-11081-E3A14005 for ; Mon, 16 Jul 2012 09:42:22 -0400 Received: by yenl12 with SMTP id l12so5855733yen.29 for ; Mon, 16 Jul 2012 06:42:20 -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=T6dPQYXqLp0po5YuVzmq47SmWq45lxpMFLQ1lqRtixQ=; b=qjINyOQA8accQ4236sNC2NzTy77A2CcFKfFGvoyfVEPJmXlftJbzXcgeYFtWMqsmYs 4/AawqSw2HVp/qRl2hGTNSRnIQglH/G3h1HtfQY3gxV8mVzTgakVbZ9JBznhuOcgqAh5 pKII1lVB2kwRravNkjzdCTXAy6B5DUanZjmGJHXYoi0DGO309GsH147bEQxTyH/8XTKP v/FkU/QPBuNQzhUAeuVN7HhoYab8FsPUJGbVFAhYPMdsEJ/AfFiTvSdfZ2tVC4HkFN+C +HfkzTEOmzKvqzaO56vgHT7mX2jAPbTxyqspIuIVG4UIPTthUFhcATEOrbWiW6V1JS9K XkTA== MIME-Version: 1.0 Received: by 10.50.217.137 with SMTP id oy9mr5203750igc.56.1342446139526; Mon, 16 Jul 2012 06:42:19 -0700 (PDT) Received: by 10.231.205.211 with HTTP; Mon, 16 Jul 2012 06:42:19 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Jul 2012 15:42:19 +0200 Message-ID: To: Ferenc Kovacs Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] supporting the final keyword for properties From: pierre.php@gmail.com (Pierre Joye) hi, On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote: > The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html > discussion > 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 (const > would be a better choice in performance wise, but then you can only set it > in your declaration where no dynamic expression is allowed.) Final and readonly are too totally different concepts. Read only properties can be implemented by doing something using the nice getter/setter RFC (https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org