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

Jacob Bandes-Storch jtbandes at gmail.com
Wed Feb 10 20:17:57 CST 2016


On Wed, Feb 10, 2016 at 6:05 PM, Matthew Judge via swift-evolution <
swift-evolution at swift.org> wrote:
>
> > Multiple prepositions before the first argument?
>
> Yes, before and including the first argument label. For example (from
> Jacob's response):
>
> comparePositionInDecodeOrderWithPosition(of cursor: AVSampleCursor) ->
> ComparisonResult
>
> Jacob suggests spelling it:
>
> comparePositionInDecodeOrder(withPositionOf cursor: AVSampleCursor) ->
> ComparisonResult
>
> I agree that Jacob's spelling is better, but not enough better to justify
> additional guidelines about prepositions.
>
>
I don't know enough about linguistics to express this properly, but I
suspect there's something to be said about the "verb phrase" being the part
that comes before the paren. To me,
"comparePositionInDecodeOrderWithPosition(of:)" is confusing because there
is a noun "Position" immediately preceding the parenthesis, which might
indicate that the argument should be a position, but in reality the most
meaningful part of the method name is the verb, "compare".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160210/fd80f6a5/attachment.html>


More information about the swift-evolution mailing list