On 3 Oct 2014, at 17:21, Thomas Gossmann <[email protected]> wrote:
> I was wondering if it is possible to deprecate/remove the function keyword
> from class methods in php7 or at least make it optional when one of the
> visibility keywords is present?
>
> I feel like writing a completely unnecessary keyword each time I write a new
> method for a class.
>
> I guess this was a discussion earlier, though I wasn't able to find anything
> about it. Would love to hear, what pdt-internals (re-)think about that topic.
Me and Pierre have discussed this before, Pierre was in favour of it last time
we talked about it. I’d certainly be in favour of allowing `function` to be
omitted when there’s a visibility specifier, like so:
public foo() {}
public static foo() {}
Easy to implement, too. What are the list’s thoughts? I don’t think it really
hampers readability much.
--
Andrea Faulds
http://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php