4 ms·
Maybe a special string flag like “use strict” — “use types”?
by Kerrick 5y ago
Maybe a special string flag like “use strict” — “use types”?
- jakelazaroff 5y agoI personally do not want to give developers the option to make type errors a user problem.
- themikesanto 5y agoType errors are a user problem already, if they make their way into production.
- jakelazaroff 5y agoNot necessarily — maybe the error is an incorrect argument to a function that’s never used, for example. The issue is, what should the browser do if it encounters a type error? Should it just refuse to interpret the entire script? That’s super heavy-handed when it’s possible that the error doesn’t even matter in practice.