3 ms·
HN is not allowing me to edit my adjacent comment (11 minutes ago...), but I meant to add: I'm sort of amazed that the implicit var args don't bother you... wi
by anothergoogler 9y ago
HN is not allowing me to edit my adjacent comment (11 minutes ago...), but I meant to add:
I'm sort of amazed that the implicit var args don't bother you... with var args promoted to first class syntax in ES6, the only reason they're still there is for backwards compatibility. Passing an unhandled arg to a function should at least be a runtime error, and likewise omitting a positional arg that lacks a default. I've seen countless bugs caused by this "feature" alone. When I think of JS programming in the large, I think of "undefined is not a function" and "cannot read property 'foo' of undefined." It's quite hellish.