←back to thread

PHP 8.5

(stitcher.io)
201 points brentroose | 6 comments | | HN request time: 0.002s | source | bottom
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 #
pjmlp ◴[] No.45990949[source]
This is true for most languages though, compare C# 14 with C# 1.0, Java 25 with Java 1.0, C 23 (plus common compiler extensions) with K&R C,....
replies(2): >>45991209 #>>45991349 #
deaddodo ◴[] No.45991349[source]
C hasn’t changed all that much, and someone who coded in C99 would take about 30mins to catch up to a modern C23 codebase’s changes. Famously so, as conservatism to change is the main friction in the community for about two decades now.

If you pull out examples of the earliest C, sure, it looks weird. But that C was already obsolete in 1989. Since then, it’s had a minor iteration (e.g. five-eight additions/modifications) every decade-ish (99, 11, 17, 23). Has it changed? Sure. Can it be compared to the iteration and speed of things like C#, Java, C++, etc? No way.

replies(4): >>45991842 #>>45992272 #>>45992334 #>>45993480 #
1. pjmlp ◴[] No.45991842[source]
I am quite sure many people would fail Pub Quizzes related to C, when taking into account the whole language alongside compiler extensions, regardless of the compiler.
replies(1): >>45992088 #
2. deaddodo ◴[] No.45992088[source]
To learn all of the common GCC and MSVC extensions would make up a fraction of the language features of C# or Java. You’re really overstating the complexity to make some invalid point.

“Actually, one of the most notoriously conservative and simple (in feature set) languages is really super complex and has evolved a ton because it has _Generic and varargs now, and __packed__ exists as a compiler feature.”

And to further double down, that minor evolution is over 36 years (arguably a decade longer, but I’m being generous with your argument). Not the 12-16 years (depending which 5 point release you wanna start with) that PHP has morphed into an entirely different language.

replies(2): >>45992707 #>>45992845 #
3. johnisgood ◴[] No.45992707[source]
Yeah, it does not take a long time to learn GCC / Clang extensions, IMO. Have an LLM give you a list of these with examples, really. :P
4. pjmlp ◴[] No.45992845[source]
A pub quizz would consider more than GCC and MSVC, and still I would bet many would fail if talking only about those two.

And I would double down on my bet regarding ISO C related questions, as I have met a few folks that contrary to myself as language nerd, hardly know what is written there or have even opened the PDF drafts at least once in their life.

replies(1): >>45992911 #
5. deaddodo ◴[] No.45992911{3}[source]
A pub quiz isn't a developer, a codebase, nor an objective measure.

If you want to use your own head canon benchmarks to prove your obviously off-base point and tell yourself you're "correct", go for it.

replies(1): >>45993872 #
6. pjmlp ◴[] No.45993872{4}[source]
It definitely is, because we are discussing knowledge of programming languages specification across their whole lifetime.