Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Refine methods for Swift #5178

Closed
Closed

Description

@1ec5

For the most part, the method names we’ve chosen in Objective-C make sense in Swift as well. However, there are some cases where the method name feels more verbose than usual, especially when the name describes a parameter’s type in addition to its role.

We should audit the entire API for opportunities to make Swift code read better. Now that realm/jazzy#136 has made it into our build system, we can annotate APIs with NS_SWIFT_NAME where they provide some measure of relief for Swift coders. For example, in #5110, visibleFeaturesAtPoint(_:inStyleLayersWithIdentifiers:) becomes visibleFeatures(at:styleLayerIdentifiers:), consistent with the Swift API design guidelines.

Considering the widespread changes that will be made to Foundation class naming in Swift 3, we should take care of this work around the time people are upgrading to the upcoming release of Xcode, so our changes won’t be breaking changes relative to the language itself.

/cc @friedbunny @boundsj @tmcw

Activity

  1. added
    iOS
    macOS
    on May 27, 2016
  2. added
    Swift
    on Feb 15, 2017
  3. added
    archived
    on Nov 12, 2018
  4. stale commented on Nov 25, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SwiftarchivediOSmacOSrefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions