[swift-evolution] Make non-void functions @warn_unused_result by default
Erica Sadun
erica at ericasadun.com
Wed Feb 24 21:12:01 CST 2016
I'd rather have something clear than short.
Some short ones that haven't been mentioned:
@Statement has a problem because the result can be used, it's just not mandated.
@Statementable just makes no English sense at all (similarly @Procedurable) but kind of communicates the idea
@ResultDiscardable: not a fan
@StatementAllowed or @AllowStatement really doesn't make a ton of sense, but it's short and kind of gets the point across.
@SideEffects also short, also kind hints at stuff, also could be misleading, and the same for @HasSideEffects.
My favorite remains @SuppressUnusedResultWarning, which isn't short but pretty damn clear.
> On Feb 24, 2016, at 7:32 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>
>> @optional_result (or ideally @optionalResult if camel-case for attributes is accepted) is clearer I think if we want a shortened two-word form.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160224/41d874b7/attachment.html>
More information about the swift-evolution
mailing list