Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

From: Date: Sun, 28 Oct 2012 00:48:06 +0000
Subject: Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-63678@lists.php.net to get a copy of this message
Stas, you should probably do some research before posting such non-sense: http://en.wikipedia.org/wiki/Property_%28programming%29 Every language you mentioned has them. Perhaps the confusion is that I am calling them accessors since other languages refer to accessors as "properties" while PHP refers to "properties" the way that other languages refer to them as "fields" or "data members." By accessors I am simply referring to getters, setters (and in the case of php, issetter and unsetter). On 10/27/2012 3:28 PM, Stas Malyshev wrote:
Hi!
What is "reflection hiding patches" referring to? Reflection is changed to reflect what the user has defined, that's what reflection is supposed to be.. no?
No. Reflection is supposed to show which methods exist on a class, which can be called from certain context, etc. This has nothing to do with where they were defined.
Lastly, this idea that accessors is such a foreign concept is a bit ridiculous. You'd be hard pressed to find a modern/popular language these days that doesn't have them, so if someone is confused about what
PHP doesn't have them. Also, by your definition, Python doesn't have them - in Python, __ methods are regular methods. Also, by your definition, Ruby doesn't have them either - in Ruby, you define them as regular methods, and you very well can call them too: http://stackoverflow.com/questions/621176/how-to-dynamically-call-accessor-methods-in-ruby#621193. Javascript doesn't have them either. Java doesn't have them either. So I'm not that hard pressed to find languages that don't follow your model, as you can see.
-- -Clint

« previous php.internals (#63678) next »