Re: Re: Patch: getters/setters syntax Implementation
| From: | Stas Malyshev | Date: | Wed, 07 Dec 2011 02:29:42 +0000 |
| Subject: | Re: Re: Patch: getters/setters syntax Implementation | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56818@lists.php.net to get a copy of this message | ||
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/propertygetsetsyntaxReading 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