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

Is NSObject(RACSubscribable) necessary? #11

Closed
jonsterling opened this issue Jun 12, 2012 · 1 comment
Closed

Is NSObject(RACSubscribable) necessary? #11

jonsterling opened this issue Jun 12, 2012 · 1 comment

Comments

@jonsterling
Copy link
Contributor

I'm looking at the NSObject(RACSubscribable) category, and it would seem that all of its methods assert conformance to <RACSubscribable> at runtime. Wouldn't this be better placed in the actual <RACSubscribable> protocol? It seems like that would be the safer and more hygienic approach.

Are there some use-cases that make the current approach necessary, or at least more optimal?

@joshaber
Copy link
Member

Those are all just conveniences so you don't have to manually create a RACSubscriber all the time. They're all based off <RACSubscribable> methods but since protocols can't have concrete implementations... we're left to implement them as a category.

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