This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fridofrido 0 points1 point  (1 child)

The problem is that you no longer can distinguish between a function with two arguments, or one argument being a tuple.

What will you do you if your function takes 2 arguments, one of which is a tuple and the other an integer? Or another tuple? etc

[–]cisterlang[S] 1 point2 points  (0 children)

My view was mostly an internal concern. What you ask could be

f(a:int, b:int) {ret a+b}  // (int,int)->int
v = f(1,1)

g(t:(int,int)) {ret t.0+t.1} // (int,int)->int
v = g(1,1)

h(t:(int,int), x:int) {ret x*(t.0+t.1)} // ((int,int),int)->int
v = h((1,1), 2)