Re: [swift-users] Making Error sub-enums Equatable

2017-05-10 Thread Quinn "The Eskimo!" via swift-users
On 10 May 2017, at 09:23, Brent Royal-Gordon via swift-users wrote: > (given your "ignore the associated type" semantic) This is the bit that worries me. The docs for `Equatable` are very clear that it implies /substitutability/, which is not the case if you ignore

Re: [swift-users] Making Error sub-enums Equatable

2017-05-10 Thread Rick Mann via swift-users
> On May 10, 2017, at 01:23 , Brent Royal-Gordon wrote: > >> On May 8, 2017, at 2:01 AM, Rick Mann via swift-users >> wrote: >> >> Seriously, I've been googling this for a half-hour, and I can't find an >> answer (everything that comes up is

Re: [swift-users] Making Error sub-enums Equatable

2017-05-10 Thread Brent Royal-Gordon via swift-users
> On May 10, 2017, at 2:05 AM, Rick Mann wrote: > > This seems so obvious that I feel like it should be provided by the language > by default. I suppose you can make it even more compact with > >case (.one, .one), > (.two, .two), > (.three, .three): >

Re: [swift-users] Help! Slicing an array is very expensive

2017-05-10 Thread Joe Groff via swift-users
> On May 8, 2017, at 4:47 PM, Rick Mann via swift-users > wrote: > > I have this C library that interacts with some hardware over the network that > produces a ton of data. It tells me up front the maximum size the data might > be so I can allocate a buffer for it,

Re: [swift-users] Making Error sub-enums Equatable

2017-05-10 Thread Brent Royal-Gordon via swift-users
> On May 8, 2017, at 2:01 AM, Rick Mann via swift-users > wrote: > > Seriously, I've been googling this for a half-hour, and I can't find an > answer (everything that comes up is for ErrorType, absolutely nothing for > Error). > > I have an enum: > > enum MyErrors :

Re: [swift-users] Help! Slicing an array is very expensive

2017-05-10 Thread Rick Mann via swift-users
> On May 10, 2017, at 11:52 , Joe Groff wrote: > > >> On May 8, 2017, at 4:47 PM, Rick Mann via swift-users >> wrote: >> >> I have this C library that interacts with some hardware over the network >> that produces a ton of data. It tells me up front