Re:The case against static typing in PHP (2023)
by dhfuuvyvtt on Saturday December 14, 2024 @04:50AM
(#42415860)
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.
Re:The case against static typing in PHP (2023)
by arunix on Saturday December 14, 2024 @05:28AM
(#42416087)
What did you mean by "viral"?
Re:The case against static typing in PHP (2023)
by mklepaczewski on Saturday December 14, 2024 @03:35PM
(#42419264)
> I've seen too many bugs with PHP static typing for it to be worth it in mature systems.
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.
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.