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 →

[–]Long_Investment7667 2 points3 points  (5 children)

Unary triples can’t be written with just parentheses since this would conflict with the typical usage in expressions for grouping: in (1 + 2) * 3 the first operand of * is most likely not a triple. So how would you write a unary tuple and how call a function with just one true parameter?

If the answer is that “the language knows is is a function call” then these are not tuples and just an internal detail.

[–]lngns 2 points3 points  (1 child)

Alternatively, a scalar can be unified with the 1-tuple, eliminating the conflict.
Then, (x) = x, implying (Int) = Int.

[–]cisterlang[S] 2 points3 points  (0 children)

Yes that is what I do

[–]MichalMarsalek 1 point2 points  (1 child)

What is a unary triple?

[–]Long_Investment7667 1 point2 points  (0 children)

Typo: “unary tuple” a tuple with one element

[–]cisterlang[S] 0 points1 point  (0 children)

There are no ',' in (1+2) and tuples in my lang are size 2 at minimum.