Re: C# properties vs. accessors RFC
| From: | Arpad Ray | Date: | Thu, 24 Jan 2013 02:36:00 +0000 |
| Subject: | Re: C# properties vs. accessors RFC | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65140@lists.php.net to get a copy of this message | ||
On Wed, Jan 23, 2013 at 10:35 PM, Clint Priest <cpriest@zerocue.com> wrote:
> On 1/23/2013 3:17 PM, Levi Morrison wrote:
>> Clint: I'm sorry that you spent all that time without hearing feedback
>> from a lot of the "No" voters. Had they been participating all along
>> perhaps it could have been avoided. We'll never know.
>
> I appreciate that, I'm hearing through the grapevine that some of the "no"
> voters haven't even looked at the patch.
>
Hi,
I voted "no" and I haven't looked at the patch, because my interest in
it doesn't extend that far.
I simply don't like the idea - it adds nothing to the language which
can't already reasonably be done, and for what it does, I find the
code harder to follow.
I'd personally much rather have $foo->setBar(42); than $foo->bar = 42;
doing something magic, even if the accessor would save a few lines of
code.
Even if I agreed with the idea, I think the "show stopper" of the
"parent::$foo" issue is still present. Forcing people to use
reflection to get a parent property is an absurd (albeit nifty)
workaround. People complain about the lack of consistency in PHP
enough already. I also think that in the RFC, it's a bit disingenuous
to only mention this limitation in a comment on the 38th line of a
code example
Regards,
Arpad