Syntax for type tuple with one element

I totally agree that current state where (k = "v") is fine but (/*k = */"v") is no tuple anymore is very confusing. But I personally feel that changing grouping from parentheses to curly braces could be extremely invasive.

Perhaps, it would be better to take the opposite way – find out a way to improve tuple syntax on both types and value literals level.

There’s a big discussion in the other thread regarding collection literals, and I personally believe these two things are connected: if there were more unambiguous and unified way to define tuples and tuple literals, then such syntax could be used for collection literals as well, because tuples are collections. Copying my message from the other thread:

1 Like