One great example I heard just today on the corecursive podcast is that some typos in your JS are only caught at runtime if at all:
varx={'prop':"text"};vary=x.porp;
y is undefined here, you only notice this once you get a strange result somewhere or, if you're lucky, get a TypeError: y is undefined. You basically need full test coverage to be sure this isn't happening before deploying.
In a typed language like C you don't have this problem:
One great example I heard just today on the corecursive podcast is that some typos in your JS are only caught at runtime if at all:
y
isundefined
here, you only notice this once you get a strange result somewhere or, if you're lucky, get aTypeError: y is undefined
. You basically need full test coverage to be sure this isn't happening before deploying.In a typed language like C you don't have this problem:
This will immediately give you a compiler error: