News for hackers. Stuff that matters.
Re:Ante: A low-level functional language by IanCal on Friday June 17, 2022 @07:13AM (#31776537)
I'm not sure I like a single item tuple being equivalent to just the item. Can you ask for the length of a tuple? The length of a tuple with two 100 element lists would be 2, and if you looked at the tail the length would be 100.
Re:Ante: A low-level functional language by dannymi on Friday June 17, 2022 @07:36AM (#31776695)
I agree. It's better to have single-item tuples still require a comma.

(1) - the number 1

1 - the number 1

(1,) - a tuple with one item, which is the number 1

1, - a tuple with one item, which is the number 1

Re:Ante: A low-level functional language by layer8 on Friday June 17, 2022 @08:02AM (#31776893)
Right. In particular if you identify tuples with lists (which seems reasonable), you run into typing problems, because singleton lists/tuples suddenly have to be unified with the element type.
Re:Ante: A low-level functional language by louthy on Friday June 17, 2022 @10:30AM (#31778771)
To be clear, I didn't say they were equivalent. They're equivalent up to isomorphism, not equal.