I was thinking about auto closures and was curious this shorthand would be good:
func assert(_ condition: @autoclosure Bool, _ label: @autoclosure String) { ... }
Where it is treated like this code:
func assert(_ condition: @autoclosure () -> Bool, _ label: @autoclosure () -> String) { ... }
This would allow for the implication that a @autoclosure
affected type would be assumed as () -> T
when T
is not a closure.
I want to know why this has not been implemented yet? Is it a technical limitation or does it conflict with the swift design guidelines.