Hacker News new | past | comments | ask | show | jobs | submit login
PHP RFC: Short Closures (php.net)
2 points by paralelogram on May 2, 2015 | hide | past | favorite | 2 comments



I honestly don't see the point, but then maybe that's because literally none of the code I write uses a callback to multiply a number by 2.

I've seen similar "look how minimal a closure can be" arguments for several languages, and they always use a ridiculously simple body - usually `$x * $y` or `$x * 2` etc.

How do they end up looking (and thus how easy are they to read) when its a realistic body with several lines?


~> looks interesting




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: