[PHP-DEV] Re: RFC: Making T_FUNCTION optional in method declarations
+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 is required for readability and it is not needed by the parser to prevent conflicts, I therefore propose the following RFC incl. patch to allow writing class Foo { public bar() { echo "Hello World"; } } 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_t_function.diff johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations
>From what I understand T_FUNCTION would be optional, rather than removed altogether, is this the case? This would allow those who want to use it the option of using it and would not break existing code. -- Ross Masters http://rossmasters.com/ 2010/11/28 David Otton > 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. > > As a plea on behalf of maintenance coders dealing with large, messy > codebases, please, please don't impact our ability to run 'grep -rs > "function functionName" *', or hit F8, or whatever your IDE's > equivalent is. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP-DEV] RFC __autodefine / spl_autodefine
Hi Sebastien, > __autoload() should die (as in get deprecated ASAP and later removed) I couldn't find anything about your opinions on this so I was wondering if you could elaborate. Do you consider autoloading as a bad practice or just that spl_autoload_register should be used to add relevant functions/closures? Regards, Ross On 6 December 2010 20:01, Sebastian Bergmann wrote: > On 12/06/2010 08:38 PM, Loon, Reinier van wrote: > >> Note: Whenever __autodefine is used, also spl_autodefine is meant. >> > > __autoload() should die (as in get deprecated ASAP and later removed), > please do not add new __auto*() functions. Note that this does not mean > that I agree or disagree with the functionality itself. > > -- > Sebastian BergmannCo-Founder and Principal Consultant > http://sebastian-bergmann.de/ http://thePHP.cc/ > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Ross Masters http://rossmasters.com/