Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-26 Thread Shawn Erickson via swift-evolution
Note much more then just Apple's frameworks leverage the optional protocol feature of Objective-C. It really is tied to a feature of objective-c and its dynamic runtime. On Mon, Apr 25, 2016 at 10:30 PM Daniel Steinberg via swift-evolution < swift-evolution@swift.org> wrote: > I am very glad to

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Xiaodi Wu via swift-evolution
On Mon, Apr 25, 2016 at 5:08 PM, Dave Abrahams via swift-evolution < swift-evolution@swift.org> wrote: > > on Sun Apr 24 2016, Chris Lattner wrote: > > >> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution < > swift-evolution@swift.org> wrote: > >> > >> >

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Dave Abrahams via swift-evolution
on Sun Apr 24 2016, Chris Lattner wrote: >> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution >> wrote: >> >> >> >> Sent from my iPhone > >> >>> On Apr 22, 2016, at 5:56 PM, Xiaodi Wu wrote: >>> >>>

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Erica Sadun via swift-evolution
> On Apr 25, 2016, at 11:49 AM, Douglas Gregor wrote: > >> >> On Apr 25, 2016, at 10:13 AM, Erica Sadun > > wrote: >> >> >>> On Apr 25, 2016, at 10:49 AM, Douglas Gregor >>

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Charles Srstka via swift-evolution
> On Apr 25, 2016, at 11:49 AM, Douglas Gregor via swift-evolution > wrote: > >> (Tangentially, why not introduce a required "override" keyword for >> conforming types that implement a version of a member introduced in protocol >> extensions? This would match the

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Erica Sadun via swift-evolution
> On Apr 25, 2016, at 10:49 AM, Douglas Gregor wrote: >> * Swift already has an `Optional` type. Importing ObjC "optional" protocol >> requirements is therefore semantically problematic from a Swift development >> POV. I don't like either the "@objcoptional" or "@objc

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Douglas Gregor via swift-evolution
> On Apr 25, 2016, at 10:13 AM, Erica Sadun wrote: > > >> On Apr 25, 2016, at 10:49 AM, Douglas Gregor > > wrote: >>> * Swift already has an `Optional` type. Importing ObjC "optional" protocol >>> requirements is therefore

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-25 Thread Douglas Gregor via swift-evolution
> On Apr 24, 2016, at 7:02 PM, Erica Sadun wrote: > > >> On Apr 24, 2016, at 3:28 PM, Chris Lattner via swift-evolution >> > wrote: >> >> >>> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-24 Thread Xiaodi Wu via swift-evolution
I think there are some good points here. As a riff, though, I'd argue that Obj-C optional should *not* be renamed to elective or something else. Renaming, so far, has been for the purpose of providing first-class Swifty idioms for existing things. It makes moving between Swift-native code and

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-24 Thread Erica Sadun via swift-evolution
> On Apr 24, 2016, at 3:28 PM, Chris Lattner via swift-evolution > wrote: > > >> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution >> wrote: >> >> >> >> Sent from my iPhone >> >>> On Apr 22, 2016, at 5:56 PM, Xiaodi Wu

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-24 Thread Xiaodi Wu via swift-evolution
On Sun, Apr 24, 2016 at 4:28 PM, Chris Lattner wrote: > > > On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution < > swift-evolution@swift.org> wrote: > > > > > > > > Sent from my iPhone > > > >> On Apr 22, 2016, at 5:56 PM, Xiaodi Wu wrote: >

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-24 Thread Chris Lattner via swift-evolution
> On Apr 22, 2016, at 8:02 PM, Douglas Gregor via swift-evolution > wrote: > > > > Sent from my iPhone > >> On Apr 22, 2016, at 5:56 PM, Xiaodi Wu wrote: >> >> Not an expert on Obj-C compatibility in Swift by any means, but this >> reads

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-23 Thread Xiaodi Wu via swift-evolution
On Sat, Apr 23, 2016 at 4:51 AM, Michael Peternell wrote: > In my opinion, requiring something is almost never something that I would > describe as a "feature". I agree with this completely. > I don't really care if the keyword is called "optional" or

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-23 Thread Michael Peternell via swift-evolution
In my opinion, requiring something is almost never something that I would describe as a "feature". I don't really care if the keyword is called "optional" or "objcoptional", I think both are fine, but I wouldn't want it to read "@objc optional". The "@objc" in "@objc optional" should be

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-22 Thread Douglas Gregor via swift-evolution
Sent from my iPhone > On Apr 22, 2016, at 5:56 PM, Xiaodi Wu 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

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-22 Thread Duan via swift-evolution
I think this change actually *increases* readability since it made the intend of the keyword clearer. +1 Daniel Duan Sent from my iPhone > On Apr 22, 2016, at 5:56 PM, Xiaodi Wu via swift-evolution > wrote: > > Not an expert on Obj-C compatibility in Swift by any

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-22 Thread Xiaodi Wu via swift-evolution
...assuming, of course, that you're putting forward a draft proposal about Swift that happens to be modest in scope, and not a Swiftian modest proposal . On Fri, Apr 22, 2016 at 7:56 PM, Xiaodi Wu wrote: > Not an expert on

Re: [swift-evolution] [Proposal draft] Make Optional Requirements Objective-C-only

2016-04-22 Thread Xiaodi Wu via swift-evolution
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