3 ms·
IMO the static analysis that becomes possible from using types is more useful than types themselves. My favorite JS gotcha is the number of special values a va
by slackingoff2017 9y ago
IMO the static analysis that becomes possible from using types is more useful than types themselves.
My favorite JS gotcha is the number of special values a variable can take on. NaN, Undefined, null, Infinity, -Infinity, maybe more? Also the fact that arrays and objects are always truthy. Honorable mention for the seemingly random results of concatenating strings. I'm tired of getting burned by these design flaws and if it takes strong typing to be protected from them than so be it.