←back to thread

PHP 8.5

(stitcher.io)
202 points brentroose | 1 comments | | HN request time: 0s | source
Show context
darkamaul ◴[] No.45990664[source]
PHP's evolution since PHP 5 has been substantial, and I think this is a real problem. As someone who learned the language years ago, the pace of change (generics, attributes, match expressions, typed properties) makes modern codebases genuinely difficult to follow.

I suspect this affects many developers who cut their teeth on PHP but haven't kept up. The language has become a different beast, which is a strength for the community but a barrier to re-entry.

replies(12): >>45990804 #>>45990834 #>>45990835 #>>45990949 #>>45991400 #>>45992500 #>>45992620 #>>45992776 #>>45993443 #>>45993687 #>>45995052 #>>45995108 #
phplovesong ◴[] No.45990834[source]
PHP has no generics? I read somewhere that is was "too hard" to get right in PHP land, mostly because of how primitive the typesystem is.
replies(3): >>45991417 #>>45991444 #>>45992643 #
1. senfiaj ◴[] No.45992643[source]
You are probably talking about this: https://stitcher.io/blog/generics-in-php-3 . If I remember correctly, the author claims it will either cause runtime overhead or extreme memory overhead. The best solution is to introduce a typed superset of PHP like TypeScript was done for JavaScript.