Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use instancetype instead of id return type #2

Closed
designatednerd opened this issue Dec 14, 2015 · 0 comments
Closed

Please use instancetype instead of id return type #2

designatednerd opened this issue Dec 14, 2015 · 0 comments

Comments

@designatednerd
Copy link

It would be helpful for your object return types, particularly in the AnalyticsLibraryNameIntegrationFactory methods, to return instancetype instead of id.

There's a longer, better explanation at NSHipster, but the short version is that instancetype is type-safe ("This will only ever be this type of object") and id is not ("What kind of object is this? ¯\_(ツ)_/¯"). This enhancement would be particularly helpful in integrating with Swift code, but it's best practice even in Obj-C.

Note: I've only filed this on this particular integration, but it'd probably be wise to update this across all your integrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants