3 ms·
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 an
by scotty79 2y ago
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.
- dhfuuvyvtt 2y agoTypescript 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.
- arunix 2y agoWhat did you mean by "viral"?
- mklepaczewski 2y ago> 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.