Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56034 invoked from network); 16 Oct 2012 23:46:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 23:46:50 -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 autodiscover.mypcguy-ca.sherweb2010.com Received: from [74.115.204.54] ([74.115.204.54:16630] helo=relay-hub202.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/6B-29764-9E1FD705 for ; Tue, 16 Oct 2012 19:46:49 -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; Tue, 16 Oct 2012 19:45:52 -0400 To: Stas Malyshev , Jazzer Dane CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 Thread-Index: Ac2oOZ3+vAOzWRcnRpOb6a/hOVK5+ADZjV8AAADsVgAAAC/7AAAAqNSAAACJGIAAACxngAAA4ZuAAAAfJQAAAEFqgAASXa0g Date: Tue, 16 Oct 2012 23:45:51 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B787A@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485612B53E4@MBX202.domain.local> <507D24E0.9070203@sugarcrm.com> <507D2C54.6030702@sugarcrm.com> <507D3459.3020900@sugarcrm.com> <507D3B6D.1090308@sugarcrm.com> <507D3DF5.6080600@sugarcrm.com> In-Reply-To: <507D3DF5.6080600@sugarcrm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.21] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 From: cpriest@zerocue.com (Clint Priest) Jesus, this is such a CF. Can I not write understandable English? read-only and write-only ENFORCE UPON SUBCLASSES that no setter or getter (= respectively) can be defined. That's all they do. There is no currently p= roposed solution that meets this need. This "NEED" was pulled from the original RFC that Dennis wrote some 4 years= ago. Perhaps we don't even NEED a solution to this problem. > -----Original Message----- > From: Stas Malyshev [mailto:smalyshev@sugarcrm.com] > Sent: Tuesday, October 16, 2012 5:59 AM > To: Jazzer Dane > Cc: Clint Priest; internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 >=20 > Hi! >=20 > > I apologize for my confusing terminology - let me elaborate. There are > > no special syntaxes. The below code should help clear things up a bit: > > > > class MyClass { > > private $otherProperty; > > public $property { > > get() {}; // Does not "have a body", as there is no code betwee= n > > the curly braces. >=20 > It does have a body. This body is just default empty method body returnin= g null - which does not throw any exceptions and is > completely indistinguishable from the outside from property being equal t= o null. > I'm not sure it's what the intent of *-only variable is, though I guess i= t is a way to hack around it. I wonder however if it can be done > better. >=20 > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227