[swift-evolution] [Review] SE-0006 Apply API Guidelines to the Standard Library
Dave Abrahams
dabrahams at apple.com
Sun Jan 31 16:52:24 CST 2016
on Sun Jan 31 2016, Erica Sadun <swift-evolution at swift.org> wrote:
>> Canonical Dave:
>>> Me:
>>> - use nouns for unambiguously functional items without side effects (distanceTo(), successor)
>>> - use verbs for unambiguously procedural items
>>
>> This works great so far. I think you can say
>>
>> - use nouns for methods with no side effects (or only incidental ones,
>> like logging)
>> - use verbs for methods with significant side-effects
>>
>> and you can stop there. Why does this have to be more complicated than
>> that?
>>
>
> Because *someone* put mutating/nonmutating rules into the
> guidelines.
Okay, guilty as charged already! :-)
> And I'm OCD enough that they are irritating me. It's the
> mutating/nonmutating bits that I perceive as unneeded hungarianisms
> that push a little too far into detailed advice by tying method naming
> to overly specific fancy rules. (Insert a joke here about fancy cats
> and fussy linguistic grooming.)
I'm saying, why don't we replace the mutating/nonmutating stuff with
what I wrote above, and stop there? Doesn't that fix the problem?
>>> One final point: I think the -ed/-ing advice is wrong. Adding "ed"
>>> isn't really creating a past tense verb (reversed).
>>
>> No, it's creating the past participle. We had this checked by a
>> linguist :-).
>
> This is why I love you guys.
A benefit of working in a large company: an expert in <whatever> will
pop out of the woodwork to correct your mistakes.
--
-Dave
More information about the swift-evolution
mailing list