I’m Erhan Kılıç, a curious web developer from Turkey who loves to write software applications and websites.
I have been working as a web developer since 2013.
I never use arrow function. If I wanted to use javascript, I would use it not php. Arrow function destoys the readabilty of the code.
I don't like using everything if it's new, you need to think about it if it's worth or not.
Hi Erhan
PHP and JavaScript are different and I don't think only just because you want to use arrow functions you would switch to JavaScript.
On the opposite hand, I think arrow functions increase the readability.
I’m Erhan Kılıç, a curious web developer from Turkey who loves to write software applications and websites.
I have been working as a web developer since 2013.
Well, If you work on your own project alone it can be ok but real world isn't like that. You can work with a team on a big project and it can be really really messy with arrow function.
I know it because I worked on a big javascript project with a big team and arrow function makes it really mess in my opinion.
Right now my php team doesn't allow using arrow function and I'm happy about it.
I respect your opinion but really disagree about being messy since arrow functions are made to make code more clear if your function is not that much complicated. If you wanted to use a global variable in PHP you should GLOBAL or $_GLOBAL which is not needed in arrow functions.
I never use arrow function. If I wanted to use javascript, I would use it not php. Arrow function destoys the readabilty of the code.
I don't like using everything if it's new, you need to think about it if it's worth or not.
Hi Erhan
PHP and JavaScript are different and I don't think only just because you want to use arrow functions you would switch to JavaScript.
On the opposite hand, I think arrow functions increase the readability.
Well, If you work on your own project alone it can be ok but real world isn't like that. You can work with a team on a big project and it can be really really messy with arrow function.
I know it because I worked on a big javascript project with a big team and arrow function makes it really mess in my opinion.
Right now my php team doesn't allow using arrow function and I'm happy about it.
I respect your opinion but really disagree about being messy since arrow functions are made to make code more clear if your function is not that much complicated. If you wanted to use a global variable in PHP you should
GLOBAL
or$_GLOBAL
which is not needed in arrow functions.For functions that perform simple operations, I'll rather a bunch of arrow functions instead.
IMO, It makes such functions more readable 😁