Maybe remove "Short-circuiting is cleaner than conditionals"?
Because:
a) You already have "Use default arguments instead of short circuiting", which is a better approach (if supported), and
b) I have seen bugs introduced by writing a short circuit when the function is supposed to accept falsy values:
function double(x) {
var value = x || -1;
return value * 2;
}
double(0); // returns -2, should return 0
Because 0 is considered as false all time, that's why you will keep getting -2
I know, that's my point :)
I've seen more than one bug introduced when people get into the habit of using short circuits to set default values, and don't consider that some functions should accept zero or the empty string as valid inputs.
That's why I think it might be time to drop the short circuit advice and just recommend using default parameters, which are better because they only match undefined.
Hey there Adam! I think this should now be fixed after #34