Suggestion: Assume/Opt-Out Pure (or MustUseReturnValue)


I find that a method having an optional return value is the exception, not the norm. It would be nice if we could assume that all methods `[MustUseReturnValue]` by default, and then apply an `[OptionalReturnValue]` attribute to methods whose return values are allowed to be ignored. (And with discards, that attribute may not even be necessary.)

Comment actions Permalink

Hello Dave Cousineau,

I've submitted a new feature request to YouTrack:

Please comment or vote for the ticket to monitor status changes.

Have a nice day!


Please sign in to leave a comment.