Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Daniel Convissor
Hi: On Sat, Nov 27, 2010 at 06:40:23PM +0100, Johannes Schlter wrote: > public bar() { Not that my vote really counts, but -1. Doing so would eliminate the helpful ability to grep source code for 'function bar'. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O

[PHP-DEV] Re: Proposed - Integrated inner iterator support for Iterator classes

2010-11-27 Thread Alec
I love it. This should get implemented. On 11/25/2010 4:52 PM, Nathan Nobbe wrote: Hi everyone, I've been taking another look at iterators lately, and compiled trunk and started experimenting with traits. I also looked at an old mail from Marcus regarding iterator_apply, and find myself wonde

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Martin Wernstahl
@Johannes: The T_STRING token never contains "$", AFAIK all identifiers starting with "$" are instead classed as T_VARIABLE tokens. So you'd search for the visibility modifier (+ static, etc.) + T_STRING for methods, and visibility (+ static) + T_VARIABLE for properties. Martin 2010/11/27 Johan

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Johannes Schlüter
On Sat, 2010-11-27 at 23:14 +0100, Johannes Schlüter wrote: > [ T_PUBLIC | T_PROTECTED | T_PRIVATE | T_STATIC | T_ABSTRACT ] { & } T_STRING > "(" param_list ")" { "{" statement_ist "}" } I forgot T_FINAL there. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Johannes Schlüter
On Sat, 2010-11-27 at 22:58 +0100, Mike Van Riel wrote: > With this patch I will loose this recognition point and the first > solution that comes to mind is to search for () or arguments. This > sounds rather hackish to me, might I be missing a solution? The rule is something like [ T_PUBLIC

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Mike Van Riel
On 27 nov 2010, at 18:40, Johannes Schlüter wrote: Hi, every now and then while writing classes I forget to add the "function" keyword between my visibility modifier and the method name in a class declaration. I don't think it is required for readability and it is not needed by the par

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Jani Taskinen
+1 for PHP 7.0. :) Stuff like this accumulating in trunk kinda makes it more and more something else than minor release.. --Jani 27.11.2010 19:40, Johannes Schlüter kirjoitti: Hi, every now and then while writing classes I forget to add the "function" keyword between my visibility modifier

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Ferenc Kovacs
2010/11/27 Johannes Schlüter > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is required for readability and it is not > needed by the parser to prevent confli

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Ferenc Kovacs
2010/11/27 Philip Olson > Sorry for moving offtopic, but if the PHP syntax is going to change then we > should revisit other proposals that add/change syntax. For example, I think > the short syntax for arrays was declined [from 5.3] mainly because it > introduced a new syntax at a time we wanted

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Marcello Duarte
+1 to being able to omit the function keyword. 2010/11/27 Johannes Schlüter : > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is required for readability and it

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Philip Olson
Sorry for moving offtopic, but if the PHP syntax is going to change then we should revisit other proposals that add/change syntax. For example, I think the short syntax for arrays was declined [from 5.3] mainly because it introduced a new syntax at a time we wanted to preserve BC: - http://wik

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Johannes Schlüter
On Sat, 2010-11-27 at 19:30 +0100, Pierre Joye wrote: > +1 if "While technically possible this RFC suggests that the following > shall NOT be valid for keeping the code readable " also means that the > patch implements it as well (force the function visibility property > usage). The patch follows

[PHP-DEV] Re: RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Ross Masters
+1, has crossed my mind before =) "Johannes "Schlüter"" wrote in message news:1290879624.7033.826.ca...@guybrush... Hi, every now and then while writing classes I forget to add the "function" keyword between my visibility modifier and the method name in a class declaration. I don't think it

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Pierre Joye
+1 if "While technically possible this RFC suggests that the following shall NOT be valid for keeping the code readable " also means that the patch implements it as well (force the function visibility property usage). 2010/11/27 Pierrick Charron : > +1 > > 2010/11/27 Johannes Schlüter > >> Hi, >>

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Pierrick Charron
+1 2010/11/27 Johannes Schlüter > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is required for readability and it is not > needed by the parser to prevent co

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Ilia Alshanetsky
As long as a modifier (public|private|protected) is still required, +1. 2010/11/27 Johannes Schlüter : > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is requir

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Felipe Pena
2010/11/27 Johannes Schlüter > Without T_FUNCTION token. In my opinion an access modifier /public, > private protected, static, final) should still be required for keeping > readability. > > RFC: http://wiki.php.net/rfc/optional-t-function > Patch: http://schlueters.de/~johannes/php/zend_optional

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Kalle Sommer Nielsen
2010/11/27 Johannes Schlüter : > RFC: http://wiki.php.net/rfc/optional-t-function > Patch: http://schlueters.de/~johannes/php/zend_optional_t_function.diff +1, I've missed being able to skip the function keyword for a while now. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals

Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Sebastian Bergmann
Am 27.11.2010 18:40, schrieb Johannes Schlüter: > RFC: http://wiki.php.net/rfc/optional-t-function > Patch: http://schlueters.de/~johannes/php/zend_optional_t_function.diff +1 -- Sebastian BergmannCo-Founder and Principal Consultant http://sebastian-bergmann.de/

[PHP-DEV] RFC: Making T_FUNCTION optional in method declarations

2010-11-27 Thread Johannes Schlüter
Hi, every now and then while writing classes I forget to add the "function" keyword between my visibility modifier and the method name in a class declaration. I don't think it is required for readability and it is not needed by the parser to prevent conflicts, I therefore propose the following RFC

Re: [PHP-DEV] Re: Hold off 5.4

2010-11-27 Thread Johannes Schlüter
On Sat, 2010-11-27 at 11:58 -0500, Matthew Weier O'Phinney wrote: > On 2010-11-26, Pierre Joye wrote: > > On Fri, Nov 26, 2010 at 8:15 PM, Zeev Suraski wrote: > > > 3. The motivation to skip 6 doesn't stem from marketing at all. The > > > main motivation is that there's a VERY concrete perceptio

Re: [PHP-DEV] Re: Hold off 5.4

2010-11-27 Thread Pierre Joye
On Sat, Nov 27, 2010 at 5:58 PM, Matthew Weier O'Phinney wrote: > On 2010-11-26, Pierre Joye wrote: >> On Fri, Nov 26, 2010 at 8:15 PM, Zeev Suraski wrote: >> > 3. The motivation to skip 6 doesn't stem from marketing at all.  The >> > main motivation is that there's a VERY concrete perception am

Re: [PHP-DEV] [RFC] new foo()->bar()

2010-11-27 Thread Felipe Pena
Hi, 2010/11/26 Felipe Pena > 2010/11/26 Johannes Schlüter > > On Fri, 2010-11-26 at 17:36 -0200, Felipe Pena wrote: >> > var_dump(new foo()->bar()->x); // string(3) "PHP" >> >> It has some readability issues. One might assume it is >> >>new (foo()->bar()->x) >> >> not >> >>(new foo())->

Re: [PHP-DEV] Re: Hold off 5.4

2010-11-27 Thread Matthew Weier O'Phinney
On 2010-11-26, Pierre Joye wrote: > On Fri, Nov 26, 2010 at 8:15 PM, Zeev Suraski wrote: > > 3. The motivation to skip 6 doesn't stem from marketing at all.  The > > main motivation is that there's a VERY concrete perception amongst > > many users about what PHP 6 is. > > Leaving the very small c

Re: [PHP-DEV] git anyone?

2010-11-27 Thread Lester Caine
Herman Radtke wrote: The DVCS migration path would not have to be as radical as the path from cvs to svn. A single section of the overall svn repoistory can be migrated to a DVCS. This pilot repo would serve two purposes: determine if that DVCS is the correct choice and allow for a more gradual

Re: [PHP-DEV] git anyone?

2010-11-27 Thread Herman Radtke
The DVCS migration path would not have to be as radical as the path from cvs to svn. A single section of the overall svn repoistory can be migrated to a DVCS. This pilot repo would serve two purposes: determine if that DVCS is the correct choice and allow for a more gradual learning curve. Pytho

Re: [PHP-DEV] Major release for BC??

2010-11-27 Thread Johannes Schlüter
On Sat, 2010-11-27 at 03:50 -0800, Karoly Negyesi wrote: > tl;dr the PHP developers have a false belief in not breaking backwards > compatibility in minor releases. Besides from what Pierre said: There is a difference between the language and the function library. The change in the language from

Re: [PHP-DEV] Major release for BC??

2010-11-27 Thread Pierre Joye
On Sat, Nov 27, 2010 at 12:50 PM, Karoly Negyesi wrote: > Hi, > > I am reading the 5.4 vs 7.0 debate. And, here's something I really > need to follow up on: "We should reserve major versions for BC breaks. > Just like we've always done". If that's what you've always done then > it's not PHP I spen

[PHP-DEV] Major release for BC??

2010-11-27 Thread Karoly Negyesi
Hi, I am reading the 5.4 vs 7.0 debate. And, here's something I really need to follow up on: "We should reserve major versions for BC breaks. Just like we've always done". If that's what you've always done then it's not PHP I spent practically every awake minute in the last seven or so years. If