Re: Dropping requirement for `function` keyword for methods in classes/interfaces/etc
| From: | Will Fitch | Date: | Wed, 20 Feb 2013 01:43:25 +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-66015@lists.php.net to get a copy of this message | ||
On Feb 19, 2013, at 6:01 PM, Zeev Suraski <zeev@zend.com> wrote:
> Are we really trying to look under ground now for ways to change the
> language syntax?
Agree 100%. Not to mention, I plan on eventually convincing enough people to replace that keyword
with a type hint ;)
>
> Unless there's a strong case to adding/removing/changing syntax, that
> goes well beyond 'because we can' or 'it shortens the code' it
> shouldn't even be brought up for discussion.
>
> Zeev
>
> On 19 בפבר 2013, at 19:44, Nikita Nefedov <inefedor@gmail.com> wrote:
>
>> Hi!
>>
>> As someone mentioned in the thread about short syntax for closures, we could also drop
>> requirement for
function keyword when defining/declaring methods in
>> classes, interfaces or traits.
>>
>> I have long noticed how redundant it is. The patch is pretty easy as it was with commas :)
>> It is absolutely backwards compatible (you can use function
>> or you can not use it). Here's the patch:
>> https://gist.github.com/nikita2206/4988075
>>
>> If people will welcome this proposal, I would need some karma for making RFC.
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>