Why don’t we have a syntactic sugar for Tuple1[A]? This could potentially be useful since in Dotty, Tuples are HLists, so Tuple1 might be encountered when writing typeful metaprogramming stuff.
Python has (a,) as syntax for creating tuples of 1 element. Why don’t we create the following syntactic sugar for Dotty?
We could do it, but I am not sure we need to. We already have
A *: () = Tuple1[A]
a *: () = Tuple1(a)
Given that 1-tuples are most useful in a context where you go over tuples generically, and that *:(i.e. HLIst-cons) is the essential building block in that context, I am not sure we need additional syntax.