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

C. Keith Ray keithray at mac.com
Sun Oct 15 15:09:36 CDT 2017


+1 to "discardable" or "@discardable" next to the result type.

] A simple “discardable” would be great. If the result is Bool and 
] “discardable” is placed right in front of it, it’s not only more readable 
] but also eliminates the redundant word “Result”. Also no at sign is great.

--
C. Keith Ray

* https://leanpub.com/wepntk <- buy my book?
* http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf
* http://agilesolutionspace.blogspot.com/

> On Oct 15, 2017, at 1:04 PM, Rudolf Adamkovič via swift-evolution <swift-evolution at swift.org> wrote:
> 
> A simple “discardable” would be great. If the result is Bool and “discardable” is placed right in front of it, it’s not only more readable but also eliminates the redundant word “Result”. Also no at sign is great.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171015/b0be7cef/attachment.html>


More information about the swift-evolution mailing list