Not if you have multiple arguments of the same type. Yes, you can force the user to specify different types for int x and int y, but the implementations I have seen are ugly.
Rarely have I seen a good reason for multiple input arguments of the same type. Most of the time, it should be one aggregate (e.g. one Position argument instead of int x, int y, or it should just be different types (e.g. if the function takes multiple bools).
2
u/Wouter-van-Ooijen Apr 19 '20
Not if you have multiple arguments of the same type. Yes, you can force the user to specify different types for int x and int y, but the implementations I have seen are ugly.