Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64485 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17950 invoked from network); 2 Jan 2013 18:45:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2013 18:45:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=philip.robert.graham@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=philip.robert.graham@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.178 as permitted sender) X-PHP-List-Original-Sender: philip.robert.graham@gmail.com X-Host-Fingerprint: 209.85.214.178 mail-ob0-f178.google.com Received: from [209.85.214.178] ([209.85.214.178:60669] helo=mail-ob0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/2E-12868-E3084E05 for ; Wed, 02 Jan 2013 13:45:18 -0500 Received: by mail-ob0-f178.google.com with SMTP id eh20so13019887obb.37 for ; Wed, 02 Jan 2013 10:45:15 -0800 (PST) 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=HBMWUdDg6fNIPrnn3K4LSctAXGyeRg81rbcicDfhgaE=; b=khtOOyaZ4JDREkcLHNiFbP9weevS0oUbM4Y7XSqj8nbHiZ9MSwbsWGUmkBoXac3DOu yChBjCPJ35PTLUNbyVyZjBmJH3oqvmZslrCtaozgvIQi+N+qp4rI+4IClyFfkFwsveFw IfkecJj3bMda5HU05UWJyOAY+bOf6YbaTE40i53AYRC3nm9eiNpSsIAS4kshlnlfucSs O/VoK0LkDpIuHDdMNO4ptgJfQwo/WdeklFyuojBXxi2yRSa5cF61JPTak/H77PMoHicW h67wnGgDt2A6jsfOvcmKpHcxqEBSRTi2bYZFadQ+5IbrVzDgnBbLDwZcu0PfX0M85CKP +H+g== Received: by 10.182.177.7 with SMTP id cm7mr35783692obc.75.1357152315820; Wed, 02 Jan 2013 10:45:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.135.225 with HTTP; Wed, 2 Jan 2013 10:44:55 -0800 (PST) In-Reply-To: <50E41BB6.4030901@zerocue.com> References: <50E41BB6.4030901@zerocue.com> Date: Wed, 2 Jan 2013 13:44:55 -0500 Message-ID: To: Clint Priest Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=e89a8f8396e3b0caff04d252a53a Subject: Re: [PHP-DEV] [PHP-RFC] Property Accessors 1.2 for Final Review before Vote From: philip.robert.graham@gmail.com (Philip Graham) --e89a8f8396e3b0caff04d252a53a Content-Type: text/plain; charset=ISO-8859-1 I am confused by one thing about the RFC. There is a section for default accessor implementations where you specify an accessor without a body, however many of the examples omit the isset and unset accessors. I would assuming that omitting an accessor would provide the automagic implementation. If this is the case what is the need for the special syntax? If this is not the case then what is the effect of omitting an accessor? I do see that omitting the setter creates a read-only property, however I think the syntax would be less ambiguous and easier to use by introducing a `readonly` keyword: class MyClass { public readonly $myProp { // ... } } This would also eliminate the need for additional syntax for default accessors. There is one problem I see with this however, what happens when a setter is provided for a readonly property? If this has already been discussed, please accept my apologies and maybe provide a link to the discussion. Regards, Philip On Wed, Jan 2, 2013 at 6:36 AM, Clint Priest wrote: > Here is the updated RFC incorporating the feedback from previous rounds of > discussion. > > https://wiki.php.net/rfc/**propertynot getsetsyntax-v1.2 > > I'm posting it for final review so I can move to voting on Jan 7th. > > Please note that the current fork is not quite up-to-date with the RFC but > will be within a few more days. > > -Clint > > -- > -Clint > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8f8396e3b0caff04d252a53a--