Theoretically speaking optional could potentially become some language sugar
right?
protocol P {
// Variable with label
var foo(a:) : ((Int) -> Void)? { get }
// more sugared version
var foo: ((a: Int) -> Void)? { get }
}
extension P {
// (1)
var foo: ((a: Int) -> Void)? { return nil }
}
// Everything from above with even more sugar
protocol P {
// default implementation (1) is inferred
optional func foo(a: Int)
}
--
Adrian Zubarev
Sent with Airmail
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution