by scotty79 · 1y ago · 0 comments
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.
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.
Can you elaborate? What kind of bugs? Can you give some examples? I'm scratching my head because I'm not sure if I ever experienced such a bug.