Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-06 Thread Chris Lattner via swift-evolution
On Sep 6, 2016, at 6:06 PM, Jonathan Hull via swift-evolution wrote: >> I'm not entirely sure on my position, though. To be convinced otherwise, I'd >> need to see a compelling real-world use case that demonstrates all of the >> following: >> >> - Safety: perhaps, with protocols, unlike class

Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-06 Thread Xiaodi Wu via swift-evolution
On Tue, Sep 6, 2016 at 8:06 PM, Jonathan Hull wrote: > > I argue the same thing applies here. Currently, protocols constrain the > API of conforming types. If a designer has reasoned through their design > correctly, then all is well. If a designer has made bad design choices, > then conforming t

Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-06 Thread Jonathan Hull via swift-evolution
> I argue the same thing applies here. Currently, protocols constrain the API > of conforming types. If a designer has reasoned through their design > correctly, then all is well. If a designer has made bad design choices, then > conforming types are constrained to have bad API design. Is that

Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-02 Thread Xiaodi Wu via swift-evolution
I think we agree on a lot of premises but come to opposite conclusions. I would not phrase it precisely how you did, that protocol designers are currently required 'to foresee all uses.' Rather, I see an analogy with these scenarios: a) Many functions in the standard library have preconditions for

Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-02 Thread Johannes Neubauer via swift-evolution
Von meinem iPhone gesendet > Am 02.09.2016 um 17:56 schrieb Thorsten Seitz via swift-evolution > : > >> Am 24.08.2016 um 21:35 schrieb Xiaodi Wu via swift-evolution >> : >> >>> On Wed, Aug 24, 2016 at 1:59 PM, Jonathan Hull wrote: >>> On Aug 24, 2016, at 7:48 AM, Xiaodi Wu wrote: >>

Re: [swift-evolution] Renaming for Protocol Conformance

2016-09-02 Thread Thorsten Seitz via swift-evolution
> Am 24.08.2016 um 21:35 schrieb Xiaodi Wu via swift-evolution > : > >> On Wed, Aug 24, 2016 at 1:59 PM, Jonathan Hull wrote: >> >>> On Aug 24, 2016, at 7:48 AM, Xiaodi Wu wrote: >>> On Wed, Aug 24, 2016 at 3:39 AM, Jonathan Hull wrote: > On Aug 23, 2016, at 8:35 AM, Xiaodi

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-25 Thread Xiaodi Wu via swift-evolution
On Wed, Aug 24, 2016 at 3:28 PM, Karl via swift-evolution < swift-evolution@swift.org> wrote: > > On 24 Aug 2016, at 20:38, Douglas Gregor via swift-evolution < > swift-evolution@swift.org> wrote: > > > On Aug 22, 2016, at 9:59 PM, Jonathan Hull via swift-evolution < > swift-evolution@swift.org> w

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Karl via swift-evolution
> On 24 Aug 2016, at 20:38, Douglas Gregor via swift-evolution > wrote: > >> >> On Aug 22, 2016, at 9:59 PM, Jonathan Hull via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> Hi everyone, >> >> We talked about this before when we were discussing mixins, and there seemed

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Xiaodi Wu via swift-evolution
On Wed, Aug 24, 2016 at 1:59 PM, Jonathan Hull wrote: > > On Aug 24, 2016, at 7:48 AM, Xiaodi Wu wrote: > > On Wed, Aug 24, 2016 at 3:39 AM, Jonathan Hull wrote: > >> >> On Aug 23, 2016, at 8:35 AM, Xiaodi Wu wrote: >> >> On Tue, Aug 23, 2016 at 3:02 AM, Jonathan Hull wrote: >> >>> >>> On Aug

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Jonathan Hull via swift-evolution
> On Aug 24, 2016, at 11:38 AM, Douglas Gregor wrote: > >> >> On Aug 22, 2016, at 9:59 PM, Jonathan Hull via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> Hi everyone, >> >> We talked about this before when we were discussing mixins, and there seemed >> to be generally

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Jonathan Hull via swift-evolution
> On Aug 24, 2016, at 7:48 AM, Xiaodi Wu wrote: > > On Wed, Aug 24, 2016 at 3:39 AM, Jonathan Hull > wrote: > >> On Aug 23, 2016, at 8:35 AM, Xiaodi Wu > > wrote: >> >> On Tue, Aug 23, 2016 at 3:02 AM, Jonathan Hull > >

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Douglas Gregor via swift-evolution
> On Aug 22, 2016, at 9:59 PM, Jonathan Hull via swift-evolution > wrote: > > Hi everyone, > > We talked about this before when we were discussing mixins, and there seemed > to be generally positive feelings towards it as a feature for the future. I > am fairly certain this affects the ABI

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Xiaodi Wu via swift-evolution
On Wed, Aug 24, 2016 at 3:39 AM, Jonathan Hull wrote: > > On Aug 23, 2016, at 8:35 AM, Xiaodi Wu wrote: > > On Tue, Aug 23, 2016 at 3:02 AM, Jonathan Hull wrote: > >> >> On Aug 22, 2016, at 11:32 PM, Xiaodi Wu wrote: >> >> On Mon, Aug 22, 2016 at 11:59 PM, Jonathan Hull via swift-evolution < >

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Charles Srstka via swift-evolution
> On Aug 24, 2016, at 3:39 AM, Jonathan Hull via swift-evolution > wrote: > > To take your example of walk(). Perhaps we have a protocol ‘Walkable’ which > refers to any data structure where the nodes can be walked using the ‘walk()’ > function. It is easy to imagine two different protocols

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-24 Thread Jonathan Hull via swift-evolution
> On Aug 23, 2016, at 8:35 AM, Xiaodi Wu wrote: > > On Tue, Aug 23, 2016 at 3:02 AM, Jonathan Hull > wrote: > >> On Aug 22, 2016, at 11:32 PM, Xiaodi Wu > > wrote: >> >> On Mon, Aug 22, 2016 at 11:59 PM, Jonathan Hull via swift-evolution >>

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread Callionica (Swift) via swift-evolution
The framework design guidelines were for ensuring code consistency and necessarily included stylistic decisions. There was no ban on using explicit interface implementation, just reasonable caution to the end goal of consistency. This is what the framework design guidelines said in 2010: https://ms

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread Xiaodi Wu via swift-evolution
On Tue, Aug 23, 2016 at 5:51 PM, Callionica (Swift) < swift-callion...@callionica.com> wrote: > C# has this feature (called "explicit interface implementation" or > "explicit interface method implementation"). It's useful for implementing > multiple data-like interfaces that have common names like

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread Callionica (Swift) via swift-evolution
C# has this feature (called "explicit interface implementation" or "explicit interface method implementation"). It's useful for implementing multiple data-like interfaces that have common names like Name, ID, Title, and Description. It's useful for keeping public interfaces clean. It's useful for A

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread David Waite via swift-evolution
C# does something similar to this - you can implement an interface without having the implementation methods published on the object. You must cast/box to the interface in order to access those methods. This is used for instance to support both the generic and non-generic interfaces for diction

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread Xiaodi Wu via swift-evolution
On Tue, Aug 23, 2016 at 3:02 AM, Jonathan Hull wrote: > > On Aug 22, 2016, at 11:32 PM, Xiaodi Wu wrote: > > On Mon, Aug 22, 2016 at 11:59 PM, Jonathan Hull via swift-evolution < > swift-evolution@swift.org> wrote: > >> Hi everyone, >> >> We talked about this before when we were discussing mixin

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-23 Thread Jonathan Hull via swift-evolution
> On Aug 22, 2016, at 11:32 PM, Xiaodi Wu wrote: > > On Mon, Aug 22, 2016 at 11:59 PM, Jonathan Hull via swift-evolution > mailto:swift-evolution@swift.org>> wrote: > Hi everyone, > > We talked about this before when we were discussing mixins, and there seemed > to be generally positive feeli

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-22 Thread Xiaodi Wu via swift-evolution
On Mon, Aug 22, 2016 at 11:59 PM, Jonathan Hull via swift-evolution < swift-evolution@swift.org> wrote: > Hi everyone, > > We talked about this before when we were discussing mixins, and there > seemed to be generally positive feelings towards it as a feature for the > future. It's been some tim

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-22 Thread Karl via swift-evolution
> On 23 Aug 2016, at 07:39, Karl wrote: > > >> On 23 Aug 2016, at 06:59, Jonathan Hull via swift-evolution >> wrote: >> >> Hi everyone, >> >> We talked about this before when we were discussing mixins, and there seemed >> to be generally positive feelings towards it as a feature for the fu

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-22 Thread Karl via swift-evolution
> On 23 Aug 2016, at 06:59, Jonathan Hull via swift-evolution > wrote: > > Hi everyone, > > We talked about this before when we were discussing mixins, and there seemed > to be generally positive feelings towards it as a feature for the future. I > am fairly certain this affects the ABI tho

Re: [swift-evolution] Renaming for Protocol Conformance

2016-08-22 Thread Charles Srstka via swift-evolution
I was just thinking about proposing something like this. +1. Charles > On Aug 22, 2016, at 11:59 PM, Jonathan Hull via swift-evolution > wrote: > > Hi everyone, > > We talked about this before when we were discussing mixins, and there seemed > to be generally positive feelings towards it as

[swift-evolution] Renaming for Protocol Conformance

2016-08-22 Thread Jonathan Hull via swift-evolution
Hi everyone, We talked about this before when we were discussing mixins, and there seemed to be generally positive feelings towards it as a feature for the future. I am fairly certain this affects the ABI though, so I thought I would bring it up now. If two protocols have methods/properties w