2012/10/15 Clint Priest <cpri...@zerocue.com> > Also, your "should be valid" statement implies that you feel properties > and accessors are the same and they are not, internally. When a class > attempts to implement an interface a "function check" is done and since > there is no __getXX() function defined it would fail to implementation > check against an interface. > > I cannot stress enough that properties != accessors in any way except the > syntax in which they are used ($o->xyz) or ($o->xyz = 1), that is their > *only* similarity.
I disagree. That's why I said this is a matter of choice. A philosophical choice. I don't see properties and accessors like different things which are accidentally written the same. Accessors are a layer upon properties. It's a magical layer, trying to mimic accessors. It's a bit like aspect-oriented programming: you can add layer but the core is still the same (from a developper point of view, not from the PHP interpreter point of view). See another argument: My proposal for read/write accessibility definition. When I suggested to allow this syntax: "public:private $abc;" some people objected that it's the same than "public $abc { get; private set; }" So, if I understand what you said, for you it's deeply different and comparing them is like comparing apples and oranges. I disagree. I still think my syntax is better (and could be implemented with better performance), but it's normal to compare them, because they (can) offer pretty much the same functionnalities.