Hacker News new | ask | show | jobs
by wlesieutre 2331 days ago
Coming from python, my other least favorite javascript-ism is that you can call functions with the wrong number of parameters and it'll just set the missing ones as undefined and assume that's what you meant to do.

Maybe people who are used to js take advantage of this and do it on purpose, but from my perspective all it's done is take mistakes and move the errors farther downstream so that you can't trivially find where the problem started.

If I wanted a function to accept a variable number of parameters or have default values for a parameter that can be omitted, I would much rather have to have to define that behavior per function.