[swift-evolution] [Guidelines, First Argument Labels]: Prepositions inside the parens

Dave Abrahams dabrahams at apple.com
Thu Feb 11 19:41:36 CST 2016

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.

> 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.


More information about the swift-evolution mailing list