[swift-evolution] [pitch] make @nonobjc the default

Jay Abbott jay at abbott.me.uk
Tue Oct 18 18:00:42 CDT 2016

Currently, if you extend a class that comes from obj-c, Swift assumes you
want to make those methods available to call from obj-c code. If you add
operators, you must declare them as @nonobjc otherwise the bridging header
which is generated declares obj-c methods with the operator character as
the method name, which isn't valid in obj-c and causes compile errors.

I'm just wondering how others feel about this - my feeling is that a Swift
developer should not have to know anything about obj-c when doing Swifty
things to a bridged class from a framework (such as extending it). As far
as they are concerned the framework class should compile the same as if it
were fully implemented in Swift.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161018/70db63cd/attachment.html>

More information about the swift-evolution mailing list