Remix.run Logo
rorylaitila 12 hours ago

Yeah I agree with this. My mind is type-oriented, but they are not a panacea. The biggest issue arises when the existing type is too wide/narrow or askew of the requirements. It can be difficult to morph the program into the new necessary types while maintaining backwards compatibility and not confusing the codebase. For this reason, I like gradual typing the most. Start with wide permissive types, narrow where I can.

I feel the allure of over typing most in typescript, because it is so flexible to make really complicated types. I see the mistakes most often when JS libraries move from JS to TS. They go overboard with the typing. The code becomes gibberish.