Re:Things I’d want to see improved in WordPress core
by michaelbrave on Monday May 23, 2022 @04:44PM
(#31484564)
I've not played with it yet but I've heard good things about the newest version of PHP, could anyone confirm?
[ Parent
| on HN ]
Re:Things I’d want to see improved in WordPress core
by dgb23 on Monday May 23, 2022 @06:37PM
(#31485715)
There is a bunch of relatively new stuff in place that really help: Enums, match, readonly (classes), attributes for metadata, union types in function signatures (very useful), improved destructuring. Also some issues with traits and interfaces have been resolved since a while.
Those kind of changes are good for PHP, because they give you more tools to write compact, simple code that plays nicely with some of the legacy builtins/libraries and so on. It's remarkable how much it has been improving.
However, it's still a clunky language, because almost every feature has its weird caveats and limits that a more modern, well designed language just doesn't have.