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

Refine methods for Swift #5178

Closed
1ec5 opened this issue May 27, 2016 · 1 comment
Closed

Refine methods for Swift #5178

1ec5 opened this issue May 27, 2016 · 1 comment
Labels
archived Archived because of inactivity iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS refactor Swift Specific to the Swift/Objective-C bridge on iOS or macOS

Comments

@1ec5
Copy link
Contributor

1ec5 commented May 27, 2016

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

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor macOS Mapbox Maps SDK for macOS labels May 27, 2016
@1ec5 1ec5 added the Swift Specific to the Swift/Objective-C bridge on iOS or macOS label Feb 15, 2017
@stale stale bot added the archived Archived because of inactivity label Nov 12, 2018
@stale
Copy link

stale bot commented Nov 25, 2018

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

@stale stale bot closed this as completed Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS refactor Swift Specific to the Swift/Objective-C bridge on iOS or macOS
Projects
None yet
Development

No branches or pull requests

1 participant