←back to thread

PHP 8.5

(stitcher.io)
201 points brentroose | 1 comments | | HN request time: 0s | source
Show context
f311a ◴[] No.45990126[source]
PHP becomes a complex language with each update. For what reason? Its application is still limited to the web, mostly.
replies(4): >>45990206 #>>45990222 #>>45990339 #>>45990423 #
dotancohen ◴[] No.45990206[source]
I downvoted you before reading the fine article. I'm back to correct that.

The new array_first() and array_last() functions are nice, everything else is either reimplantation of existing features or "features"which will make maintainability more difficult. The pipe operator is one such example. I don't need it - these nested methods are not really an issue in any codebase I've seen. The new syntax only works for unary functions, so higher arity functions must be wrapped in an arrow function. It's a mess and more bug prone than just nesting the functions.

replies(5): >>45991162 #>>45991537 #>>45992150 #>>45992480 #>>45994526 #
1. pbowyer ◴[] No.45991162[source]
> The pipe operator [...] syntax only works for unary functions, so higher arity functions must be wrapped in an arrow function.

It's coming - but to get PHP RFCs to pass they have to be salami-sliced, otherwise they're voted down.

https://wiki.php.net/rfc/partial_function_application_v2