Tony has helped me to become a better programmer in an unexpected way.
Years back, as a beginning programmer I got really confused by his other articles. As I was looking for guidance on application design I took him seriously but also noticed that his examples of "good design" were in fact the opposite.
Later it dawned upon me that the was doing COBOL in PHP. Those lengthy articles are mostly bad takes, but it is interesting nonetheless to see how strict the last believer sticks to the Old Belief. I would take none of his advice, but still have big respect for his stamina.
I think TypeScript shown that you can have dynamic language with as much or as little static typing as you like.
Old common static typing languages felt bad and restrictive and contorting just because typing is hard that when people created them made a relatively simple, underpowered thing which was as complex as they could make. Understanding of types advanced much since then so now you can conveniently and partially add types even to a dynamic language with rich semantics and there's very little reason not to as (unitentionally) demonstrated by this article.
Typescript doesnt blow up when someone passes a legacy assumption into a static typed area of dynamic code.
I've seen too many bugs with PHP static typing for it to be worth it in mature systems. It's great in greenfield, but yeah, old code is hard to work it into unlike typescript which tends to be more forgiving. Though, I will say, typescript is just as viral if not more so.
Is this still a discussion in 2023? I remember writing phpdoc @type hints in 2013, as that was the de facto way to have intelligent autocompletion in editors back then.
I will never understand how people can say that dynamic typing makes them more productive:
"Have you ever changed the type of a function argument and then had to find all usages and change them? Have you ever changed a class and then had to recompile, and redeploy, all the classes that used that class? These are just three of the issues that don't occur nearly as often in dynamically typed languages."
If you change the type of an argument you OF COURSE want/need to change all usages of that function in both static and dynamic languages - how in the world did you expect sqrt(struct Person) to behave? - but static typing helps you quickly find all those instances so you're more productive in making that refactor.
Likewise, if you program C, you better be full of self-doubt, precise and disciplined.
My mantra is
"Programmers thinking that dynamic typing is better should never use a dynamically typed language, whereas programmers thinking that static typing is the only sane choice may use a dynamically typed language in special cases."
People that don´t see dangers take more risks, but they are also the least likely to understand your advice. People that don't understand how types help to adapt and grow software are the least likely to refactor when needed to.
That is why I think it is fine to use a type-brittle programming language for quick scripts, but not for building applications that have to change over time and need to be maintained by multiple people.
Years back, as a beginning programmer I got really confused by his other articles. As I was looking for guidance on application design I took him seriously but also noticed that his examples of "good design" were in fact the opposite.
Later it dawned upon me that the was doing COBOL in PHP. Those lengthy articles are mostly bad takes, but it is interesting nonetheless to see how strict the last believer sticks to the Old Belief. I would take none of his advice, but still have big respect for his stamina.