Roadmap for and state of single element tuple types?

I think that, in order to have a meaningful discussion about tuples, we first have to know whether it is 1 or 2 that is the case in the following.


Assuming the current situation, that ((T)) == (T) == T, then either:

  1. All types are tuple types (1-tuples)

or

  1. There exist no such thing as a 1-tuple.

As far as I understand, these are the only two possibilities (please correct me if I'm wrong).


The difference between 1 and 2 might perhaps seem philosophical and without practical consequences, but here's an example of how it is not:

It doesn't seem unlikely that structural types (like tuple types) will one day allow extensions and protocol conformances.

So, once we can extend tuple types, something like this:

extension Tuple {
    func foo() { ... }
}

then, depending on whether 1 or 2 is the case:

  1. All types will have foo().

or

  1. Only (), (T, U), (T, U, V), ... will have foo().

I don't know which of these two makes most sense, but I whish the situation wasn't such that we must logically rule out a third (imo more intuitive) option, ie:

  1. Only (), (T), (T, U), (T, U, V), ... will have foo().

(But as long as ((T)) == (T) == T, case 3 is the same as case 1.)

2 Likes