Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-12-06 Thread Joe Groff via swift-evolution
> On Dec 5, 2016, at 11:46 PM, Zach Waldowski via swift-evolution > wrote: > > I hate to be a thread necromancer, but I ran into the limits of the current > behavior several times today alone. I was perhaps overexcited by the > additional ObjectiveCBridgeable

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-12-05 Thread Zach Waldowski via swift-evolution
I hate to be a thread necromancer, but I ran into the limits of the current behavior several times today alone. I was perhaps overexcited by the additional ObjectiveCBridgeable compliance of numeric types, and took off several `.rawValue`s in a way that were hard to track down. A few other

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-07 Thread Joe Groff via swift-evolution
> On Oct 7, 2016, at 2:11 PM, Dave Abrahams via swift-evolution > wrote: > > > on Mon Oct 03 2016, Joe Groff > wrote: > >>> On Sep 30, 2016, at 10:48 PM, Russ Bishop wrote: >>> >>>

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-07 Thread Dave Abrahams via swift-evolution
on Mon Oct 03 2016, Joe Groff wrote: >> On Sep 30, 2016, at 10:48 PM, Russ Bishop wrote: >> >> >>> On Sep 29, 2016, at 11:45 AM, Douglas Gregor via swift-evolution >>> > wrote: > >>> >>> >>> Personally, I

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-07 Thread Russ Bishop via swift-evolution
> On Oct 3, 2016, at 9:23 AM, Joe Groff wrote: > >> >> On Sep 30, 2016, at 10:48 PM, Russ Bishop wrote: >> >> >>> On Sep 29, 2016, at 11:45 AM, Douglas Gregor via swift-evolution >>> wrote: >>> >>> >>> Personally, I

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-03 Thread Joe Groff via swift-evolution
> On Sep 30, 2016, at 10:48 PM, Russ Bishop wrote: > > >> On Sep 29, 2016, at 11:45 AM, Douglas Gregor via swift-evolution >> wrote: >>> >> >> >> Personally, I consider the first one to be a fairly-low-risk extension to >> SE-0139 that’s

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-02 Thread Brent Royal-Gordon via swift-evolution
> On Oct 2, 2016, at 3:46 PM, Dave Abrahams via swift-evolution > wrote: > >> Do you mind providing some color on this design? It seems to me that >> the proposal's ObjectiveCBridgeable design was both more idiomatic > > How so? I mean merely that, when asked "How

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-02 Thread Dave Abrahams via swift-evolution
on Sun Oct 02 2016, Brent Royal-Gordon wrote: >> On Oct 1, 2016, at 8:45 AM, Dave Abrahams via swift-evolution >> wrote: >> >>> I’m up for reviving the ObjectiveCBridgeable proposal :) >> >> Okay, but IMO the API of that protocol is

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-02 Thread Brent Royal-Gordon via swift-evolution
> On Oct 1, 2016, at 8:45 AM, Dave Abrahams via swift-evolution > wrote: > >> I’m up for reviving the ObjectiveCBridgeable proposal :) > > Okay, but IMO the API of that protocol is wrong. Any public interface > should look something like _CustomObjectiveCBridgeable

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-10-01 Thread Dave Abrahams via swift-evolution
on Fri Sep 30 2016, Russ Bishop wrote: >> On Sep 29, 2016, at 11:45 AM, Douglas Gregor via swift-evolution >> wrote: >>> >> >> > >> Personally, I consider the first one to be a fairly-low-risk >> extension to SE-0139 that’s borderline

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-09-30 Thread Russ Bishop via swift-evolution
> On Sep 29, 2016, at 11:45 AM, Douglas Gregor via swift-evolution > wrote: >> > > > Personally, I consider the first one to be a fairly-low-risk extension to > SE-0139 that’s borderline bug-fix. We already know that those types have weak > numeric

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-09-29 Thread Douglas Gregor via swift-evolution
> On Sep 29, 2016, at 10:16 AM, Joe Groff via swift-evolution > wrote: > > In the discussion around SE-0139 (bridging NSNumber and NSValue), many people > pointed out that it's common in ObjC to use NSNumbers holding enum constants > in Cocoa containers. Many ObjC

Re: [swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-09-29 Thread Zach Waldowski via swift-evolution
I think limiting to types that are both @objc and RawRepresentable is a nice compromise; that limits the type preservation needed to work around "slushiness" to NSString, NSNumber (already done), and NSError. I know your pitch doesn't cover this problem, but I would also note that C varargs

[swift-evolution] [Pitch] Making some RawRepresentable things bridge to ObjC as their raw value

2016-09-29 Thread Joe Groff via swift-evolution
In the discussion around SE-0139 (bridging NSNumber and NSValue), many people pointed out that it's common in ObjC to use NSNumbers holding enum constants in Cocoa containers. Many ObjC interfaces look something like this: /// A washing machine. @interface QXWashingMachine