News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by destriaero on Friday October 06, 2023 @08:23AM (#37789780)
That's great unless you are working with a codebase that spans decades and tens of millions of lines of code. At that point if for every assignment you are tracing through your data types manually - you are out of a job.

Also, if I am using an API another team is providing - I don't want to have to go and trace through their code.

Re:Strong typing, a hill I'm willing to die on by Aeolos on Saturday October 07, 2023 @01:07AM (#37799142)
And that's assuming you even have access to said source code. In many cases, you just receive a semi-documented JSON object and a prayer.

Anecdotal story: We recently went through an effort to introduce strict-type checking for our typescript backend. As part of that effort, we introduced concrete types for every API accessible across a service boundary, which caught 6 mismatches between the documentation and the implementation (e.g. return Promise<bool> vs Promise<Instance>) and several hundred issues with missing null or type checks that would result in an "InternalServerError" instead of a meaningful error message.

We started rolling the strict version out this week, and we can already see a meaningful improvement in the sentry logs.