Re: [PHP-DEV] Short Function Syntax

2023-11-03 Thread Marcos Marcolin
Hi, I don't think this inclusion is a problem, but I also don't see any real benefits. Some parts of the syntax should be verbose to make it easier to read and understand, especially for those who are just arriving. Soon, people will want to be writing `pub` instead of `public`, or `priv` instea

Re: [PHP-DEV] Short Function Syntax

2023-11-02 Thread daniil
Hi, I don't hate the idea, I actually really like the rust-ish look of it, though personally I would prefer to have short function syntax for closures before methods (I.e. fn () { ... } is a syntax I wanted and could not use countless times in all the years since the introduction of arrow functi

Re: [PHP-DEV] Short Function Syntax

2023-11-02 Thread Oleksii Bulba
> I know that the `fn` Syntax is already used for arrow functions, but what i > am suggesting is that, can't we make `fn` to be used in naming methods in > class? (this will be optional though), Hello Oladoyinbo, Personally for me, if I see `fn` in methods instead of `function` I would expect it

Re: [PHP-DEV] Short Function Syntax

2023-11-02 Thread Vinicius Dias
I honestly don't see any benefits. `function` isn't verbose, it's explicit. I prefer `function` over `fn` for methods. But despite what one may prefer, I believe changing the language syntax just because of "taste" probably isn't worth the effort. -- PHP Internals - PHP Runtime Development Maili