On Mon, Apr 25, 2016 at 5:08 PM, Dave Abrahams via swift-evolution < [email protected]> wrote:
> > on Sun Apr 24 2016, Chris Lattner <[email protected]> wrote: > > >> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution < > [email protected]> wrote: > >> > >> > >> > >> Sent from my iPhone > > > >> > >>> On Apr 22, 2016, at 5:56 PM, Xiaodi Wu <[email protected]> wrote: > >>> > >>> Not an expert on Obj-C compatibility in Swift by any means, but this > >>> reads like it's largely a change of nomenclature. To me, though, > >>> `objcoptional` reads exceedingly poorly. Why not emphasize the Obj-C > >>> compatibility angle by requiring the `@objc` attribute to precede each > >>> use of `optional`? (In other words, effectively rename `optional` to > >>> `@objc optional`.) > >> > >> That is a great idea. > > > > Doesn’t this have the same problem as the current (Swift 1/2) > > implementation? People will continue to believe that it is a bug that > > you must specify @objc. > > Doesn't that argue for @objc(optional) > > ? > That was my first instinct as well, but I'm persuaded by Doug's points on the issue, which I'll just quote below because he puts it much better than I could: * "It shouldn't be an attribute because it changes the type signature of references to the requirement." * "Do remember that @objc(something) already has a meaning: it gives the Objective-C name “something” to the entity that the @objc(something) describes."
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
