2 ms·
> How is that a non-issue? In C, there is a distinction between a value and a pointer to some value. In Javascript, as far as I understand, everything is a ref
by krylon 9y ago
> How is that a non-issue?
In C, there is a distinction between a value and a pointer to some value. In Javascript, as far as I understand, everything is a reference, so the specific mistake the C compiler caught would be impossible to make in Javascript in the first place. (Then again, C does not have concept of promises.)
I am not saying type checks are bad or useless. In fact, over the years, I have grown to appreciate every little bit of advice a static analyzer can give me. But among the bugs I have produced using dynamically typed languages, few had to do with using the wrong type.