Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc
| From: | Peter Lind | Date: | Tue, 19 Feb 2013 21:03:04 +0000 |
| Subject: | Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65994@lists.php.net to get a copy of this message | ||
On 20 February 2013 00:12, Nikita Nefedov <inefedor@gmail.com> wrote:
> On Tue, 19 Feb 2013 19:10:22 -0000, Rasmus Lerdorf <rasmus@lerdorf.com>
> wrote:
>
>> On 02/19/2013 03:07 PM, Nikita Nefedov wrote:
>>
>>> Are you grepping for all the functions or you are grepping just for some
>>> specific function? If so, you are likely already know what visibility
>>> this function has, so couldn't you grep for
public
>>> %functionName%
>>> instead of function %functionName%?
>>> At the end, you can always use `grep
>>> '(function|public|private|protected) functionName' file`, and if it's
>>> long to type, you can make sh script, or even alias.
>>
>>
>> public is the default visibility so it is often left off, so no, I can't
>> grep for that.
>>
>> -Rasmus
>
>
> As Sara noted, we shouldn't let users define methods without modifiers at
> all, so at least public/private/protected will have to be there.
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Just a quick check: you're absolutely certain this issue isn't much
better/easier handled with IDE macros/plugins? Something along the
lines of zen coding? If you're really that obsessed with typing 9
characters less, you must have considered keyboard shortcuts that let
you type the docblock, visibility, etc. in just 3-5 keystrokes.
Just a thought from userland
Peter
--
<hype>
WWW: plphp.dk / plind.dk
CV: careers.stackoverflow.com/peterlind
LinkedIn: plind
Twitter: kafe15
</hype>