4 ms·
Yes, exactly. Typescript managed to be the best of both worlds, as you can be both lenient when you're still in the design/prototyping phase of a project, and
by mablopoule 4y ago
Yes, exactly.
Typescript managed to be the best of both worlds, as you can be both lenient when you're still in the design/prototyping phase of a project, and need to test idea quickly, but also add as much type-check as you see fit when you're maintaining a project, and need to interface with lots of existing code.
As such, I'm always a bit miffed when I see so many people adamant on setting it to maximum strictness by default, under the guise of "best practice".
- moogly 4y agoAs someone who has "strictified" a lot of code bases after the fact, starting out with `strict` is way less friction than adding it later on. Especially `strictNullChecks`. It's a massive headache to deal with that later on.
- eyelidlessness 4y agoYup. And strict mode tends to guide devs towards better code/API design. Stuff like function/method overloads with dynamic argument types might seem convenient when the types are loosey goosey, but it usually becomes obvious they’re probably a bad idea when you have to specify the types upfront.