Thanks for providing these links, I've missed this information.
I suppose it is better to wait for User-defined tuple conformances.
@Slava_Pestov can you share some details on progress of tuple conformances? Is it expected in Swift 5.10 / 5.11 / later...?
Some more questions:
- Currently this is valid:
let instance: Void = (())
// empty tuple with empty tuple
Will it be possible to doextension Tuple<Void>: Hashable
orextension Void: Hashable {}
? Are these declarations equivalent? - Will this warning be eliminated?
func buildInstance<T>(_ builder: () -> T) -> T { builder() }
let instance = buildInstance { Void() } // warning: Constant 'instance' inferred to have type '()', which may be unexpected
- Will
Void
,(Void, Void)
and(Void, Void, Void)
have the same hashValue?