[swift-evolution] /*Let it be*/ func() -> @discardable Bool {} /*Rather Than*/ @discardableResult func() -> Bool {}
Jean-Daniel
mailing at xenonium.com
Fri Oct 13 15:15:28 CDT 2017
I don’t think this is a good idea to make discardable part of the function type.
What would fun(callback: () -> discardable Int) would means ?
And allowing it in signature but not in lambda would be confusing.
> Le 12 oct. 2017 à 15:32, Mike Kluev via swift-evolution <swift-evolution at swift.org> a écrit :
>
> On 12 October 2017 at 14:14, David James <davidbjames1 at gmail.com <mailto:davidbjames1 at gmail.com>> wrote:
> True, and it was making the method signature too long. But at least I have the option to do that. If we move the annotation to just before the return type, then we have no choice.
>
> you can still put it on the next line along with the result :)
>
> imho, this shall not be a decision maker nowadays (20 years ago it would).
>
> Mike
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171013/e8c78bee/attachment.html>
More information about the swift-evolution
mailing list