Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63571 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78848 invoked from network); 20 Oct 2012 19:35:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2012 19:35:00 -0000 Authentication-Results: pb1.pair.com header.from=ww.galen@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ww.galen@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: ww.galen@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:41495] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/95-22055-3ECF2805 for ; Sat, 20 Oct 2012 15:34:59 -0400 Received: by mail-wi0-f182.google.com with SMTP id hm2so1050180wib.11 for ; Sat, 20 Oct 2012 12:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=fuveexKzownRtULAGAn7jZiuEzMJ53uD+uL6gMaoetE=; b=aH8iMOaH13desT/pmZtuWjolk/aPydbWiKC7pSLxTMlynDv+O78LyuVLTDUkoIgGEZ 3h+b9xvn8IYpyALXXDklHvi8YZ/nHOfahUym8TFwtFXMHK1fuqq8kbla66TlOUH/pO+1 QW+Nfcz2Tsgnp6xbZnJOP3vvBNrIyFfcwXkz29/V3lFkNxJr8s3kmaY7LhRIWaKlu0DB 4zJFxiAbqj7eMiQUDqtM8Vhzdo5/bgu29qDP9KTJY3hT8zf3WfptrX8BSY7joSbNOty+ HkLcJVPKoi8tBD4Wy2VyhS9ywfTBZp0PDtuGZ7yOZOsvuHGknxIK98rW3lPnwYBSfM+C JsUg== Received: by 10.216.141.14 with SMTP id f14mr2835910wej.208.1350761696496; Sat, 20 Oct 2012 12:34:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.54.101 with HTTP; Sat, 20 Oct 2012 12:34:16 -0700 (PDT) In-Reply-To: <5082F701.7090602@lsces.co.uk> References: <9570D903A3BECE4092E924C2985CE4856140BA80@MBX202.domain.local> <5082F701.7090602@lsces.co.uk> Date: Sat, 20 Oct 2012 12:34:16 -0700 Message-ID: To: Lester Caine Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0016e6dd97b7188dec04cc82b7fd Subject: Re: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords From: ww.galen@gmail.com (Galen Wright-Watson) --0016e6dd97b7188dec04cc82b7fd Content-Type: text/plain; charset=ISO-8859-1 On Sat, Oct 20, 2012 at 12:09 PM, Lester Caine wrote: > > I am in favor of eliminating the read-only/write-only keywords and >> implementing no "special code" to make what was read-only/write-only >> language enforced. I think the alternatives with final are just fine and >> good enough and will let userland programming enforce it if they so desire. >> > But the question still remains. Isn't a read only variable simply a > 'const'? Why do we need anything more than that? It explains exactly why it > has been defined without any ambiguity and works everywhere. > A read-only variable may be calculated from other values, and there may not be an inverse calculation. As a concrete example, consider an invoice total calculated from line items. It will change as the line items change, but it wouldn't make sense to me to be able to set the order total and have that somehow be back-propagated to the line items. --0016e6dd97b7188dec04cc82b7fd--