[swift-evolution] /*Let it be*/ func() -> @discardable Bool {} /*Rather Than*/ @discardableResult func() -> Bool {}

Mike Kluev mike.kluev at gmail.com
Mon Oct 9 13:20:54 CDT 2017


On Sat, 7 Oct 2017 07:48:08 +0100, <swift-evolution-request at swift.org>
wrote:

> So it would be:
>
> func() -> @discardable Bool { }
>
> Rather than:
>
> @discardableResult func() -> Bool { }
>


i'd say:

func foo() -> discardable Bool {
    ...
}

if we were starting from scratch

It could be even better if someone could perhaps find a shorter word that
> is a synonym for the word "discardable", that would be as explicit in
> intent as the word "discardable" is in such context, yet be written with
> fewer characters.
>

 Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171009/61d27fea/attachment.html>


More information about the swift-evolution mailing list