@tbkka It was initially proposed as @nonescaping modifier. However, it eventually became ~Escapable. Could you please expand on why? I feel like the initial notion is far superior and would allow much better composition, but I'm sure you had a good reason to express it as a property of type instead of a property of a function argument.
Also, are non-escaping closures ~Escaping (and subject to lifetime modifiers)? Will it be possible to write this:
func f(_ g: borrowing () -> Void) -> copy(g) () -> Void { // not sure about `copy`
g
}
PS:
- A
copy(self)lifetime dependency with aborrowingorinoutmutation-modifier
I believe it should be "borrowing or mutating"