News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by DanielHB on Thursday October 05, 2023 @07:23AM (#37777196)
Dynamic types do make people create more dynamic APIs because it is a lot easier to let the parameter be number or string or format-function or bigint, etc

Dynamic APIs are super hard to reason about if you don't have types to ensure you are calling your APIs correctly (function argument A can be number or string, but not formatFunction)

So having static types makes your APIs less dynamic because people are too lazy to type them correctly. Which in general is good in my opinion, making an API dynamic should be done only when it is really helpful to do so.

The other point is null-guards which _some_ (but not all) type systems enforce, null-guards are just 100% good thing.

There are no comments on this comment yet.