Hacker News new | ask | show | jobs
by xigoi 925 days ago
I don't see the value of, say, dot_product(vector1=x, vector2=y) compared to dot_product(x, y).
2 comments

> I don't see the value of, say, dot_product(vector1=x, vector2=y) compared to dot_product(x, y).

I would include functions which implement (especially unary/binary) mathematical operators where the operands either are interchangeable or have a clear conventional order, in languages where you cannot make them actual operators, within the exception for operators.

2 parameters are usually fine, but then I have seen quite a few bugs with atan2(y,x).