[swift-evolution] swift-evolution Digest, Vol 3, Issue 7
andrewzboard at gmail.com
Wed Feb 3 14:51:06 CST 2016
On 2 Feb, 2016, at 8:41, dabrahams at apple.com wrote:
>> * I also agree with Radosław in that I prefer `removeAll(keepCapacity:
>> Bool)` to `removeAll(keepingCapacity: Bool)`.
> I had a hard time justifying "keeping" to myself for a while, but
> eventually I realized that this pattern is less ambiguous, at least in
> general, since many verbs are also nouns.
This is one of my real bugbears. I think we should call this out explicitly somewhere in the guidelines. Consider something like “updatePostThread”. (This does come from real life, and occasioned some bad words.) All three words: “update”, “post”, and “thread” are *both* noun and verb. This means that (theoretically) there could be 8 different interpretations.
I suggest a guideline that recommends avoiding verb-noun words in favor of ones that are only a noun or only a verb.
More information about the swift-evolution