[swift-evolution] [Guidelines, First Argument Labels]: Prepositions inside the parens
Dave Abrahams
dabrahams at apple.com
Fri Feb 12 00:28:40 CST 2016
on Thu Feb 11 2016, Jordan Rose <swift-evolution at swift.org> wrote:
>> On Feb 11, 2016, at 17:41, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>>
>>
>> on Thu Feb 11 2016, Jordan Rose <swift-evolution at swift.org> wrote:
>>
>
>>>> On Feb 11, 2016, at 16:00, Dave Abrahams via swift-evolution
>>>> <swift-evolution at swift.org> wrote:
>>>>
>>>> Doug and I reviewed these, and we don't think they work. The right
>>>> criterion for cocoa seems to be “pull ‘of’ into the base name unless—as
>>>> Jordan suggested—it means “having.”
>>>>
>>>> Fortunately that seems to be easily determined. After looking at all
>>>> the APIs in Cocoa, “of” in the base name means “having” exactly when it
>>>> is followed by one of the following words: “type,” “types,” “kind,”
>>>> “size,” “length,” and maybe “stage” (we're trying to analyze
>>>> removeModifiersOfStage
>>>> <https://developer.apple.com/library/mac/documentation/SceneKit/Reference/SCNParticleSystem_Class/#//apple_ref/doc/uid/TP40014177-CH1-SW132
>>>> <https://developer.apple.com/library/mac/documentation/SceneKit/Reference/SCNParticleSystem_Class/#//apple_ref/doc/uid/TP40014177-CH1-SW132>>
>>>> to figure out how “of”is being used—assistance welcome).
>>>
>>> As usual, I object to hardcoded supposedly-exhaustive lists. I'd
>>> rather have people fix these up manually with NS_SWIFT_NAME and such.
>>
>> We could “automatically fix them up manually” with NS_SWIFT_NAME and let
>> the framework owners review the patches, but since we know exactly which
>> ones work it would be a huge waste to ask each framework owner to find
>> them on their own.
>
> Yes, I'm fine with that. My point is I don't want it added to the
> automatic translation rules. (I expect to be overruled, again.)
>
>>
>>> Given that the parallel to -removeModifiersOfStage: is
>>> -addModifierForProperties:atStage:withBlock:, I think the stage is not
>>> being treated as part of the modifier.
>>
>> I don't think I understand what you wrote above, sorry.
>
> This is in reference to "we're trying to analyze
> -removeModifiersOfStage: to figure out how 'of' is being
> used—assistance welcome". My reading is that it is not an "of" that
> really means "having".
That's nice, then. It means 3 fewer NS_SWIFT_NAMEs or one fewer
automatic import rules (if you're overruled).
--
-Dave
More information about the swift-evolution
mailing list