Update Swift.org API guidelines regarding "get" in function names

Many of these violations "in the wild" are due to the standards of other languages being applied to Swift get / set pairings are common in Java and C#, so those developers tend to use the same naming in Swift. We can see this a lot in libraries like SwiftNIO, especially the earlier versions, which ported much of a Java library to Swift.

Personally I really dislike get (and to a lesser extent set) as part of method names. There are almost always better terms for the action performed by a method. For your example, getLineDash should likely be something like parseLineDash or extractLineDash.

1 Like