←back to thread

PHP 8.5

(stitcher.io)
202 points brentroose | 1 comments | | HN request time: 0.207s | 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. dgb23 ◴[] No.45992150[source]
Many of the newer features have this problem. Like the match keyword, enums, closures etc. They are half-baked versions of what could be powerful and expressive features.

Meanwhile it seemingly abandoned features and unique selling points, like the in-built templating, associative arrays with value semantics and the fact that it integrates well with C or the simple fact that it can be used to write web server scripts very easily. To me, many of these cool features have been largely ignored or even moved away from.