Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29810 invoked from network); 20 Oct 2012 10:21:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2012 10:21:49 -0000 Authentication-Results: pb1.pair.com header.from=tbprogrammer@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tbprogrammer@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.42 as permitted sender) X-PHP-List-Original-Sender: tbprogrammer@gmail.com X-Host-Fingerprint: 209.85.219.42 mail-oa0-f42.google.com Received: from [209.85.219.42] ([209.85.219.42:34414] helo=mail-oa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/8E-22055-C3B72805 for ; Sat, 20 Oct 2012 06:21:48 -0400 Received: by mail-oa0-f42.google.com with SMTP id j1so1299323oag.29 for ; Sat, 20 Oct 2012 03:21:46 -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=+gQ0R8mzanm03R4zohu3rRHSPPMlNhhvGNMGATomezI=; b=E2SJZZ4GLN3FrOTbkfeTr3PepEWt57pvXbjpqvzQWsHOS3DtRh3pkAyhP4DHyrDLNS 1wzGV7LY6ezip6Pq0tpojm3QMqZG9JGdtLhNRJy1uvMPxa7OTp3jkKGCev0vDXFR7ttb 7gqaDDgN4MIe9ApFsNpalxtvP9SbcVSaOhCpasakqztrob5QqdN8I23wSbmECQ351nv0 oRS9N+emmD+6UdWdqMQHtk+pmT/4LYFMzvuxv4+L8So618MVmm8LfayR2eY9F8iiRudw 2YUBGbOZMZhNzqTh5xLMJ4z3EYGdaS7+M0V2F3GOC5f+/mEZCsSW6PnST9seBaFjaqJW DAhQ== Received: by 10.182.21.135 with SMTP id v7mr2607127obe.101.1350728505152; Sat, 20 Oct 2012 03:21:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.170 with HTTP; Sat, 20 Oct 2012 03:21:24 -0700 (PDT) In-Reply-To: References: <9570D903A3BECE4092E924C2985CE485612C2595@MBX214.domain.local> Date: Sat, 20 Oct 2012 03:21:24 -0700 Message-ID: To: Pierre Joye Cc: Clint Priest , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=14dae93b6374bcd2ca04cc7afc63 Subject: Re: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords From: tbprogrammer@gmail.com (Jazzer Dane) --14dae93b6374bcd2ca04cc7afc63 Content-Type: text/plain; charset=ISO-8859-1 Nikita brought up a good point: There aren't all that many scripts that use final methods, which could very well be the same fate for final property accessor methods. Due to the very possible unpopularity of whatever magic syntax/keyword we could potentially come up with, we *could *alternatively trash any magic read/write-only keywords/syntax and just allow people to manually throw a read-only exception. Opinions? On Sat, Oct 20, 2012 at 3:15 AM, Pierre Joye wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --14dae93b6374bcd2ca04cc7afc63--