Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63558 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25763 invoked from network); 20 Oct 2012 10:15:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2012 10:15:17 -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.223.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.223.170 mail-ie0-f170.google.com Received: from [209.85.223.170] ([209.85.223.170:64100] helo=mail-ie0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/9D-22055-4B972805 for ; Sat, 20 Oct 2012 06:15:17 -0400 Received: by mail-ie0-f170.google.com with SMTP id c12so2089581ieb.29 for ; Sat, 20 Oct 2012 03:15:14 -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=zPy9iYi0hqW6CpykwCp1VGZcK8BgPiIanGwQ/t1a81o=; b=aVTo23kM4UaHbtPEFyEbZWXtMmdts5w4r72cryKAfo+UOWjy5964p1K6ofcpzW/VpT sdMHmSNlBNGfxhuuAVN3TegIo8pfc8bB13u+r8/YOFLHDJfs2R9TcDOghHfIQFTC0oFC dNQYmoBT4aRLWM6hXzQVSFwR9c6OR2TQXt+hBX7D/D9iom11im41XNHAQeuXDYXYAYQ0 TjQeL22aJiJ6Js2Mu0yXlASr8TFP2+1m2W5OqMaLGpIcCzGmwv6iSLGAs5+RFP1+6y56 hMCXThi9Q1Ggxv6vG+4c1T7BEcBXAiwLZd1cu5KltXbMwOrj70kxCRR++ZP1iJpIychD C5BQ== MIME-Version: 1.0 Received: by 10.50.5.236 with SMTP id v12mr4676944igv.6.1350728113906; Sat, 20 Oct 2012 03:15:13 -0700 (PDT) Received: by 10.64.33.143 with HTTP; Sat, 20 Oct 2012 03:15:13 -0700 (PDT) In-Reply-To: <9570D903A3BECE4092E924C2985CE485612C2595@MBX214.domain.local> References: <9570D903A3BECE4092E924C2985CE485612C2595@MBX214.domain.local> Date: Sat, 20 Oct 2012 12:15:13 +0200 Message-ID: To: Clint Priest Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords From: pierre.php@gmail.com (Pierre Joye) On Sat, Oct 20, 2012 at 1:07 AM, Clint Priest wrote: > I had thought of a deviation on some of the ideas presented to get rid of read-only/write-only while still keeping the ability to maintain their effect, if we so decide that the feature is wanted. Here it is: > > class TimePeriod { > private $Seconds; > > public $Hours { > get() { return $this->Hours; } > final set NULL; > } > } > > It's close to what's been suggested but is pretty clear that there IS NO SETTER it could not be called within the class and since its final it cannot be over-ridden. I've included this in the change tracking document. > > Thoughts? Sorry but I don't like it, it makes me think that there is no setter but I could set the property manually (yes, that's not an actual one but putting myself in the shoes of a lambda user). I actually prefer the read-only syntax, while we have to make it clear and not confusin (see Niki's reply in this post). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org