Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Nikita Popov
The implementation specifically didn't introduce T_GET/T_SET on the lexer side and instead checks for T_STRINGs with content "get" or "set". Nikita On Wed, Dec 7, 2011 at 3:29 AM, Stas Malyshev wrote: > Hi! > > >> I believe the attempt with the RFC was to mimic the syntax that C# >> went with, t

Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Stas Malyshev
Hi! I believe the attempt with the RFC was to mimic the syntax that C# went with, the RFC is here: https://wiki.php.net/rfc/propertygetsetsyntax Reading this RFC I notice it makes get/set keywords. This would lead to huge amount of breakage in existing code, so I strongly suggest to look for a

Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Sebastian Krebs
Hi 2011/12/6 Rasmus Schultz > On Tue, Dec 6, 2011 at 3:45 AM, Christian Kaps >wrote: > > > Hi, > > > > I also find this syntax confusing and I think it has a huge WTF factor. > > > > Some thoughts about the syntax: > > - At the first glance, it isn't clear which visibility the getter or > > set

RE: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Clint M Priest
rnals@lists.php.net Subject: Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation On Tue, Dec 6, 2011 at 4:23 AM, Clint M Priest wrote: > I believe the attempt with the RFC was to mimic the syntax that C# > went with, the RFC is here: > https://wiki.php.net/rfc/propertygetsets

Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Rasmus Schultz
On Tue, Dec 6, 2011 at 3:45 AM, Christian Kaps wrote: > Hi, > > I also find this syntax confusing and I think it has a huge WTF factor. > > Some thoughts about the syntax: > - At the first glance, it isn't clear which visibility the getter or > setter has > - The extra indentation level makes the

Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Pierre Joye
On Tue, Dec 6, 2011 at 4:23 AM, Clint M Priest wrote: > I believe the attempt with the RFC was to mimic the syntax that C# went with, > the RFC is here: https://wiki.php.net/rfc/propertygetsetsyntax C# like setter/getter is definitely what I would like to have in PHP, it is a very clear and know

RE: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Christian Kaps
Hi, I also find this syntax confusing and I think it has a huge WTF factor. Some thoughts about the syntax: - At the first glance, it isn't clear which visibility the getter or setter has - The extra indentation level makes the code more unreadable class Foo { /** * */ priv

RE: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-05 Thread Clint M Priest
I believe the attempt with the RFC was to mimic the syntax that C# went with, the RFC is here: https://wiki.php.net/rfc/propertygetsetsyntax The first public would apply to either of the get/set which did not have it further defined, for example: public $Hours { get { ... } priv