3 ms·
Maybe you are one of those 10x programmers who can magically keep track of all the type data in your head and always catch yourself before you push to prod. I
by cultofmetatron 6y ago
Maybe you are one of those 10x programmers who can magically keep track of all the type data in your head and always catch yourself before you push to prod.
I and most people however are human and make mistakes sometimes. Worse, the bigger the project, the more you need to collaborate between people and sometimes teams. Types are almost like docs that check your code at compile time and reduce the chances of human error creating a production failure. Its not a panacea but its certainly nice to know that if I change a functions parameter, that the system breaks someone else's code depends on that function following a certain signature. At that point, I can either write a different function, message him to update his code or discuss how to make the changes together. All 3 cases are MASSIVE upgrades over fiding out shit broke in prod with some undefined behavior arising.