Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63338 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14651 invoked from network); 11 Oct 2012 05:30:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2012 05:30:48 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.54 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.54 relay-hub202.domainlocalhost.com Received: from [74.115.204.54] ([74.115.204.54:8173] helo=relay-hub202.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/71-04101-38956705 for ; Thu, 11 Oct 2012 01:30:47 -0400 Received: from MBX202.domain.local ([169.254.169.44]) by HUB202.domain.local ([192.168.68.46]) with mapi id 14.02.0283.003; Thu, 11 Oct 2012 01:30:00 -0400 To: Pierre Joye CC: PHP internals , Jazzer Dane Thread-Topic: [PHP-DEV] [RFC] Propety Accessors v1.1 Thread-Index: AQHNpfaE0wLAVcGGQAyyWuaNO91x4ZezPRQAgABndID//8fU0IAAZqOA///DKzA= Date: Thu, 11 Oct 2012 05:29:59 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B4FCB@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485612B3B48@MBX202.domain.local> <5073328D.5000002@gmail.com> <50735165.8010703@aaronholmes.net> <9570D903A3BECE4092E924C2985CE485612B4353@MBX202.domain.local> <760ab4f994a78a846cf86aafda71e0e2@mohiva.com> <9570D903A3BECE4092E924C2985CE485612B4EFE@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B4F63@MBX202.domain.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.22] Content-Type: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE485612B4FCBMBX202domainloc_" MIME-Version: 1.0 Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE485612B4FCBMBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable What about private final set($value) { } tells you that it's read only? Th= ere is a setter. From: Pierre Joye [mailto:pierre.php@gmail.com] Sent: Thursday, October 11, 2012 12:05 AM To: Clint Priest Cc: PHP internals; Jazzer Dane Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 On Oct 11, 2012 5:00 AM, "Clint Priest" > wrote: > > Why is everyone so dead set against read-only and write-only? > > I could not disagree more with you on what is "pretty" and "readable". > > To me: > > public read-only $hours { > get { ... } > } > > Is infinitely more readable and understandable than: > > public $hours { > get() { ... } > private final set($value) { ... } > } Fully agreed. It is obvious and clear like water. Cheers, Pierre --_000_9570D903A3BECE4092E924C2985CE485612B4FCBMBX202domainloc_--