Re: [RFC] Property Accessors v1.2 Consensus Changes

From: Date: Mon, 19 Nov 2012 15:36:35 +0000
Subject: Re: [RFC] Property Accessors v1.2 Consensus Changes
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-63974@lists.php.net to get a copy of this message
On Mon, Nov 19, 2012 at 1:19 AM, Clint Priest <cpriest@zerocue.com> wrote: > Can anyone who has an interest in this project please review over the > "Current Consensus Changes" section of this document: > > https://wiki.php.net/rfc/**propertygetsetsyntax-as-** > implemented/change-requests<¾?,? –·™éÑà > êáhttps://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests> > > Lets hear if there are any other concerns, otherwise in the next couple of > days I will integrate these changes into the main RFC document and begin > work on the changes from 1.1 -> 1.2. > > Still left open (undecided) is internal accessor method visibility and > callability. Primarily this is between Stas and Nikita, I prefer not > visible (makes more sense to me) but callable (less difficult to implement, > simpler for the code). I would appreciate some more input on this topic > from anyone interested. > > How long is it before 5.5 is in feature-freeze? I'm guessing at this > point that this will not make the 5.5 release, but depends on the powers > that be. > > -Clint > The changes look good to me. Two notes: 1. The "internal accessor method visibility and callability" point should really be "should accessors be implemented as magic methods?" Might help to clarify what the discussion was actually about. 2. I never really meant the "DateTime $date;" syntax as just a shorthand notation for the automatic setter with typehint. Rather it was meant as an alternative way to do the typehinting in the first place. I.e. instead of public $date { set(DateTime $date) {} } you would do public DateTime $date { set($date) { } } (like in C# for example). I would have preferred this way (mainly because it allows to typehint even without specifying accessors), but I can also live without it ^^ Thanks for your work on this, Nikita

« previous php.internals (#63974) next »