Re: RFC: Making T_FUNCTION optional in method declarations

From: Date: Sun, 28 Nov 2010 21:05:24 +0000
Subject: Re: RFC: Making T_FUNCTION optional in method declarations
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-50672@lists.php.net to get a copy of this message
On Sunday, November 28, 2010 9:12:34 am Felipe Pena wrote: > 2010/11/28 Ross Masters <ross@php.net> > > > 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. > > Yes, exaclty... File me -1. The above argument is oft-used but is not, in fact, a valid argument unless all of the code you work with is your own. The minute you start using 3rd party code (you know, sharing generic libraries in good software engineering and open source etiquette) you are at the whim of whatever syntactic "options" they chose to use. Optional "function", strict typing, exceptions, the list goes on. There is no such thing as an "optional" language feature if you're working with code you didn't write. Given that, making "functional" optional makes the language more complex (for me visually scanning it, for an IDE parsing it, etc.) in order to save a few characters. Bad trade-off. --Larry Garfield

« previous php.internals (#50672) next »