I'm a Systems Reliability and DevOps engineer for Netdata Inc. When not working, I enjoy studying linguistics and history, playing video games, and cooking all kinds of international cuisine.
I think it's really situationally dependent, but I feel that way about a lot of language safety features.
I've dealt with a few type errors in JavaScript, but TypeScript would not have caught any of them (they were all cases of runtime values being something other than expected, and thus collapsing to either undefined or NaN, that's quite simply something TS just can't save you from). The only exception to this has been dealing with the difference between for...in and for...of loops, but that's rather hyper-specific and mostly due to my background in Python (where for value in array means you're iterating array values, not array indices).
Beyond that, most of the other arguments aren't all that great for me (I use vanilla Vim for coding, so type checking in the IDE isn't an option for me even if I do use TS, I'm pretty religious about documenting my code properly, so that's not an issue for me either, etc), so I have no real interest in using it.
I think it's really situationally dependent, but I feel that way about a lot of language safety features.
I've dealt with a few type errors in JavaScript, but TypeScript would not have caught any of them (they were all cases of runtime values being something other than expected, and thus collapsing to either
undefined
orNaN
, that's quite simply something TS just can't save you from). The only exception to this has been dealing with the difference betweenfor...in
andfor...of
loops, but that's rather hyper-specific and mostly due to my background in Python (wherefor value in array
means you're iterating array values, not array indices).Beyond that, most of the other arguments aren't all that great for me (I use vanilla Vim for coding, so type checking in the IDE isn't an option for me even if I do use TS, I'm pretty religious about documenting my code properly, so that's not an issue for me either, etc), so I have no real interest in using it.
Exactly, it totally depends.
Love that you hold onto your preferences!