Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63457 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41218 invoked from network); 16 Oct 2012 11:07:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 11:07:00 -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:62085] helo=mail-oa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/3D-10021-2DF3D705 for ; Tue, 16 Oct 2012 07:07:00 -0400 Received: by mail-oa0-f42.google.com with SMTP id j1so6602755oag.29 for ; Tue, 16 Oct 2012 04:06: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=cFNRhWcHuHpBfI7uYD9UvHVNCLAqGM5Xh3uQCulKJKM=; b=puWu9stx+c2akMFxTTG5S0SLowMrMVFBO2ydYzIdOGlDKY+Vn0niPrAE/+lbOBg5JW nSs4VNsaUd7srrG9nz63HAEhuLPuWVNBnhkEfktcjAciGm8nZUfdICwwoWkzETxQ/Mtj Ne7mgImYuoyzMTHQS53jzIj5/BRCrAJSI3Nz0/vI0HW85MjA0YPRwksbdvn3/22kH3KE g63nGzN7xJyydsvtB0n3z7cJQsMLVh5FEi4LYpRG5l4vVKjaRLSvrTiK19nQ/V4w1uL4 ukC3f9uDFyn+/Pt8FL9bPfex8loibfc6Sy+y54X/S+iK9VXmDUzaJ2jhgjVq3aNOepx7 jTag== Received: by 10.60.170.176 with SMTP id an16mr11941358oec.57.1350385616464; Tue, 16 Oct 2012 04:06:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.170 with HTTP; Tue, 16 Oct 2012 04:06:36 -0700 (PDT) In-Reply-To: <507D3DF5.6080600@sugarcrm.com> 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> Date: Tue, 16 Oct 2012 04:06:36 -0700 Message-ID: To: Stas Malyshev Cc: Clint Priest , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=bcaec54a325efaaab204cc2b2664 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 From: tbprogrammer@gmail.com (Jazzer Dane) --bcaec54a325efaaab204cc2b2664 Content-Type: text/plain; charset=ISO-8859-1 Excuse my late-night-influenced terminology, the word "empty" is much more suitable than "does not have". And this "solution" really is more of a hack or work-around than a solution. I do think that there is a better way to go about implementing read/write-only, but nothing has come to mind as of yet - at least nothing that doesn't completely change major aspects of this RFC. On Tue, Oct 16, 2012 at 3:59 AM, Stas Malyshev wrote: > Hi! > > > 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 between > > the curly braces. > > It does have a body. This body is just default empty method body > returning null - which does not throw any exceptions and is completely > indistinguishable from the outside from property being equal to null. > I'm not sure it's what the intent of *-only variable is, though I guess > it is a way to hack around it. I wonder however if it can be done better. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > --bcaec54a325efaaab204cc2b2664--