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

Default protocol implementations #12

Open
aleene opened this issue Dec 22, 2016 · 4 comments
Open

Default protocol implementations #12

aleene opened this issue Dec 22, 2016 · 4 comments
Labels

Comments

@aleene
Copy link
Owner

aleene commented Dec 22, 2016

Can I define some default protocol function implementations, so that I can get rid of the @obj and optionals.

@aleene
Copy link
Owner Author

aleene commented Dec 27, 2016

I added this, but it was not very helpful. You still need to implement alls protocol functions, even if you do not need them.

@aleene
Copy link
Owner Author

aleene commented Dec 27, 2016

It seems I have to get rid of datasource and delegate and call the functions directly. I can then overwrite specific functions in conforming classes. And I should make it an extension of protocol.

@aleene
Copy link
Owner Author

aleene commented Dec 28, 2016

I will create separate files for Delegate and Datasource. And add a default implementation in an extension. IN apps that adhere I can override the implementations if required.

@aleene
Copy link
Owner Author

aleene commented Dec 28, 2016

This seems to work.

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

No branches or pull requests

1 participant