Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc

From: Date: Tue, 19 Feb 2013 22:39:07 +0000
Subject: Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-65983@lists.php.net to get a copy of this message
On Tue, 19 Feb 2013 17:53:40 -0000, Johannes Schlüter <johannes@schlueters.de> wrote:
I agreed to the conclusion that the "function" keyword provided a nice way to grep for functions when handling foreign code and leaving it out only provides little improvement in less typing. Please provide new arguments for a new discussion. (That thread was rather long) And as a general note I'd like to remind you all about Rasmus' recent mail: http://news.php.net/php.internals/65894 - In my words: Why not fix bugs instead of creating new ones? johannes
Hmm, I agree about grepping, but how often do you do it? Actually, last time I grepped php files was half a year ago I think, when I had just ssh connection and didn't want to mount sshfs. But usually there's IDEs that can statically analyze your code and let you search against huge codebases in seconds, I don't want to sound mean, but hey, does anybody greps php code? What about reasoning - of course there's no reasons besides less typing. At the moment, usually when I want to define method, I usually already know will be in its body so I'm trying to type as fast as I can, and I often make some mistake in public keyword or function, actually it happens all the time :) So for me it would be pretty good feature if I could write one less word. I agree with Sara about requirement for explicit declaration of visibility attr.

« previous php.internals (#65983) next »