Re: RFC: Making T_FUNCTION optional in method declarations

From: Date: Sun, 28 Nov 2010 11:14:28 +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-50651@lists.php.net to get a copy of this message
On Sun, 28 Nov 2010 10:42:00 -0000, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
Hi!
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:
I find it fascinating that a short time ago the short array syntax and other like proposals were unanimously rejected with "PHP needs no syntax sugar, everything should be explicit and verbose!" and now it's complete reversal - everybody supports syntax sugar, adding new complex syntax and what not.
In my opinion, the short array syntax is a completely different matter and we shouldn't be constantly diverting discussions...
I personally am not sure this thing is worth doing, I never had a problem with typing "function" but if so many people do, maybe it's OK for a major version release.
It's a completely redundant keyword, which I frequently forget and where I find no expressive power. But I also write a lot of Java, so I might be biased. I'm +0 on this. -- Gustavo Lopes

« previous php.internals (#50651) next »