On Thu, Oct 11, 2012 at 2:35 AM, Clint Priest <cpri...@zerocue.com> wrote:
> Okay, I would like this to be the last time there are revisions to this > RFC. > > To sum up the last few days of conversations, I have these down as points > of contention: > > 1. Accessor functions should not be present on the object and callable > directly, for example, $o->__getHours() should not be allowed. > 2. Preferred syntax for accessors should be "public set($value) { ... }" > with no "magic" $value (with possible type hinting) > 3. Automatically implemented get; set; with auto-backing field should be > eliminated as this is not necessary for PHP and is confusing most everyone. > This is actually the most useful for me imho, why is it confusing? It creates a property that is a pure getter/setter what 90% of the properties need. It would be a shame to see this go. > 4. read-only / write-only keywords, keep them or get rid of them? There > is no directly suitable replacement but I believe a private final set() { } > will take care of it, even though it much more verbose. > +1 for private final. Its already there, why not use it. > 5. Error handling for thrown exceptions should be made more appropriate > for accessors > 6. The "truth" of reflection. Should it reveal details internal to how > PHP works on the inside or should it reflect the way PHP presents it as > options? > The Reflection API has to be such, that I can code-generate a stub of the class just from the Reflection API.That means that we have to have access to the getter/setter methods of the property, otherwise we couldnt generate a stub for "public $Hours { public set(DateTime $time) { ... }}" > > Did I miss anything? > > > I will come up with some way for people to vote on the issues at hand and > we can cast our votes and be done with it, then I will finish the project > and get it out the door. > > -Clint >