Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56819 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91238 invoked from network); 7 Dec 2011 06:17:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2011 06:17:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:61267] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/76-40938-EE40FDE4 for ; Wed, 07 Dec 2011 01:17:19 -0500 Received: by lagj5 with SMTP id j5so66039lag.29 for ; Tue, 06 Dec 2011 22:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gjVsiURPFA2paRx7TfpH+oeX+oHXOvuIkHIzQw83uqE=; b=PU9CrgYBSx/bHF2OqOO475A9eXXA3OWbZ2QBZ8up5yaaSmQb6BSqf7zKmj9OS2k5Df pf4PtkFgjXG4a3mMfmlvJcPLrIaCyG04E8EzwPMh4FiyoVyWxRll/wYwBNMSWl0WCkqA ndkO348lkIcP24s+OrHpPiXLH1tDt2QGogk+g= MIME-Version: 1.0 Received: by 10.152.105.132 with SMTP id gm4mr10724328lab.39.1323238635585; Tue, 06 Dec 2011 22:17:15 -0800 (PST) Received: by 10.152.108.110 with HTTP; Tue, 6 Dec 2011 22:17:15 -0800 (PST) In-Reply-To: <4EDECF96.9000700@sugarcrm.com> References: <9570D903A3BECE4092E924C2985CE4853994C39F@MBX202.domain.local> <4EDECF96.9000700@sugarcrm.com> Date: Wed, 7 Dec 2011 07:17:15 +0100 Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation From: nikita.ppv@googlemail.com (Nikita Popov) The implementation specifically didn't introduce T_GET/T_SET on the lexer side and instead checks for T_STRINGs with content "get" or "set". Nikita On Wed, Dec 7, 2011 at 3:29 AM, Stas Malyshev wrote: > Hi! > > >> I believe the attempt with the RFC was to mimic the syntax that C# >> went with, the RFC is here: >> https://wiki.php.net/rfc/propertygetsetsyntax > > > Reading this RFC I notice it makes get/set keywords. This would lead to > huge amount of breakage in existing code, so I strongly suggest to look > for another way. For example, __get and __set... > > I'm also not a big fan of magic $value variable coming from nowhere and > function syntax without function definition. What if you want a getter to > return by-reference? Or setter to get parameter by reference? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >