We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
md5: 295aff435f019895cd28d9719bbf68f1
Issue Description:
The Swift Programming Language states that the @objc attribute is required when declaring optional methods in a protocol.
I'm assuming it has to do with ObjC interoperability. I'd love to know about the reasoning behind this implementation as well.
If this is something that is surmountable, I'd love if that requirement could be removed in a future version of Swift.
The text was updated successfully, but these errors were encountered:
Comment by Aaron Brager (JIRA)
There's some discussion about this here: http://thread.gmane.org/gmane.comp.lang.swift.evolution/13347
I think the consensus is that there's already a few ways to do that:
use protocol extensions to create a no-op implementation for the optional items
make a separate protocol for the optional items
use some other type (like an optional closure) to optionally coordinate behavior with another type
Sorry, something went wrong.
Can this be closed as "Won't Do"?
No branches or pull requests
Additional Detail from JIRA
md5: 295aff435f019895cd28d9719bbf68f1
Issue Description:
The Swift Programming Language states that the @objc attribute is required when declaring optional methods in a protocol.
I'm assuming it has to do with ObjC interoperability. I'd love to know about the reasoning behind this implementation as well.
If this is something that is surmountable, I'd love if that requirement could be removed in a future version of Swift.
The text was updated successfully, but these errors were encountered: