[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution
Greg Parker
gparker at apple.com
Thu Feb 11 17:48:08 CST 2016
> On Feb 11, 2016, at 3:20 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>
> Using foo and fooInPlace is obvious, understandable, and easy. As a suffix, it perfectly communicates the difference between a mutating and non-mutating version, and doesn't involve anything on the level of gerunds, past participles, pluperfects, prozac, or anything like that.
One downside of foo / fooInPlace is that it may not be immediately obvious that `foo` is not an in-place operation. @warn_unused_result helps solve that. If you incorrectly use `foo` as if it were an in-place operation then @warn_unused_result will complain in most contexts.
--
Greg Parker gparker at apple.com Runtime Wrangler
More information about the swift-evolution
mailing list