Syntax for type tuple with one element

No it wouldn’t. unit appears as a variable identifier both for units (meters, etc.) and for unit testing.

This is not one of the easier terms to reclaim. It can’t be a soft keyword; you have to be able to use it anywhere.

So your argument for not repurposing () applies to unit as well.

extension (u: Unit)
  inline def t: EmptyTuple = Tuple()

or somesuch would work.

1 Like