More things I need to re-learn: the optimal number of function argumetns is 0, but 1 is OK. More than 3 is a recipe for bugs.
@cstanhope I agree partially, but it's also true for C and languages like that. A C function that gets a long list of arguments can often easily be called with arguments in the wrong order. It may be a little easier to catch in C, but only when the arguments are of incompatible types.
The number of types I've called strcpy(src, tgt) is scary, and it's not always possible to have src be const.
Or was it strcpy(tgt, src)?
This is not a language comparison fight.
@liw No fight from me! :) I was just thinking it through about how broadly your observation applies and how it even applies with static languages. Every time I have a functions whose argument list seems to be growing, I start to think of ways to reduce it or make it harder to to call it wrong. Although, I admit I spend more effort on public facing functions than private ones.