Member since
Supporting the RFC aligns with the direction modern programming languages are taking. In my work with PHP, I've often found closures to become needlessly verbose, especially when multiple variables are involved. The requirement of the "use" statement can make the code bloated:
return Cache::remember('key', 60, function () use ($start, $end, $other) { // Logic here return $result; });
Multi-line short closures would eliminate this redundancy, making the code more concise and readable. On a side note, while the "fn" keyword isn't the core issue, it further adds to the awkwardness. As PHP continues to evolve, it should prioritize developer experience, and this RFC pushes it in the right direction.