Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60225 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59229 invoked from network); 20 Apr 2012 06:32:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2012 06:32:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.173 smtp173.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.173] ([67.192.241.173:51946] helo=smtp173.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/10-57893-513019F4 for ; Fri, 20 Apr 2012 02:32:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp17.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id ADBC21884C8; Fri, 20 Apr 2012 02:32:50 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp17.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 62E371884C5; Fri, 20 Apr 2012 02:32:50 -0400 (EDT) Message-ID: <4F910311.7040406@sugarcrm.com> Date: Thu, 19 Apr 2012 23:32:49 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Clint M Priest CC: "internals@lists.php.net" References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> In-Reply-To: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Property get/set syntax From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > If there is no other discussion for this, I'd like to move this to the voting phase, any objects? > > https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented Sorry, I didn't have time to look into it yet (yes I know it was around for a long time...) in detail. From the quick glance I don't like the read-only/write-only keywords too much but maybe it's ok. It's not clear what "automatic implementation" is. Could you expand this section and add explanation what actually happens? What would happen if I use $this->property &= $a; or $a &= $this->property; $a = 1;? What happens if getter/setter function uses the same property it is defined for? What if it uses other property that in turn uses this one? In the last example for overloading, it looks like "parent::$Milliseconds = $value;" calls parent setter. This looks like static property access but is not. I don't think it's a good thing. What if you also have static class var called $Milliseconds? And especially that later you introduce the same syntax for accessing class properties! How these would work with isset - what !empty($this->Hours) return? What would happen if you do unset($this->Hours)? What happens if you do $this->Hours++ or sort($this->Hours) (assuming $Hours is an array)? These things need to be defined in the RFC too. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227