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
nday, December 05, 2011 5:11 PM To: internals@lists.php.net Subject: [PHP-DEV] Re: Patch: getters/setters syntax Implementation 2011/12/4 Clint M Priest : Updated patch w/o white-space: http://www.clintpriest.com/patches/accessors_v1.patch In the end it is a relatively simple patch. The new s

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

2011-12-05 Thread Clint M Priest
internal variable, it was not designated in the rfc and I made it this way to be the most flexible for the author. -Original Message- From: Rasmus Schultz [mailto:ras...@mindplay.dk] Sent: Monday, December 05, 2011 5:11 PM To: internals@lists.php.net Subject: [PHP-DEV] Re: Patch: getters

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

2011-12-05 Thread Rasmus Schultz
2011/12/4 Clint M Priest : > Updated patch w/o white-space: http://www.clintpriest.com/patches/accessors_v1.patch > > In the end it is a relatively simple patch. The new syntax effectively creates internal functions on the object and the system looks for those functions and calls them at the appro