Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-05 Thread Dave Abrahams via swift-evolution
on Wed May 04 2016, Matthew Johnson wrote: > On May 4, 2016, at 5:50 PM, Dave Abrahams via swift-evolution > wrote: > > on Wed May 04 2016, Matthew Johnson wrote: > > On May 4, 2016, at 1:29 PM, Dave Abrahams via swift-evolution > wrote: > >

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-05 Thread Basem Emara via swift-evolution
How about mutating keyword just like func's: mutating protocol Foo {…} Isn’t that what the current “class” keyword is trying to indicate? It feels awkward that a protocol would inherit from a reference type when just looking at the syntax, whether it be class, AnyObject, etc. > On May 5, 2016,

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-05 Thread Jesse Squires via swift-evolution
> Personally I have always felt “class” was an oddball special case here that's unneeded because we have a perfectly good protocol that means the same thing: AnyObject. +1 Repurposing the `class` keyword to constrain a protocol to reference types has always felt awkward, out-of-place, and inconsi

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-05 Thread Tino Heth via swift-evolution
I've been thinking of a different name as well — but I was concerned by the fact that "class" is lowercase, while all "regular" types start uppercase… I'd prefer "Class" or "Reference" over "reference". Tino ___ swift-evolution mailing list swift-evolut

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread David Sweeris via swift-evolution
> On May 4, 2016, at 13:29, Dave Abrahams via swift-evolution > wrote: > > In order for something like AnyValue to have meaning, we need to impose > greater order. After thinking through many approaches over the years, I > have arrived at the (admittedly rather drastic) opinion that the > lang

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Matthew Johnson via swift-evolution
> On May 4, 2016, at 5:50 PM, Dave Abrahams via swift-evolution > wrote: > > > on Wed May 04 2016, Matthew Johnson > wrote: > >>> On May 4, 2016, at 1:29 PM, Dave Abrahams via swift-evolution >>> wrote: >>> >>> >>> on Wed May 04 2016, Adrian Zubarev wro

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Dave Abrahams via swift-evolution
on Wed May 04 2016, Matthew Johnson wrote: >> On May 4, 2016, at 1:29 PM, Dave Abrahams via swift-evolution >> wrote: >> >> >> on Wed May 04 2016, Adrian Zubarev wrote: >> > >>> Not sure what to think about the enum cases inside a protocol (if AnyEnum >>> would >>> even exist), it could b

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Matthew Johnson via swift-evolution
> On May 4, 2016, at 2:31 PM, Adrian Zubarev via swift-evolution > wrote: > > I kinda feel my idea went into the wrong direction. > > By introducing these implicit protocols (formatted with Source Code Pro font) > I didn’t meant them to force a type to have only reference or value semantics.

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Adrian Zubarev via swift-evolution
I kinda feel my idea went into the wrong direction. By introducing these implicit protocols (formatted with Source Code Pro font) I didn’t meant them to force a type to have only reference or value semantics.                    +---+                    |  Any  |                    +---+---+

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Matthew Johnson via swift-evolution
> On May 4, 2016, at 1:29 PM, Dave Abrahams via swift-evolution > wrote: > > > on Wed May 04 2016, Adrian Zubarev wrote: > >> Not sure what to think about the enum cases inside a protocol (if AnyEnum >> would >> even exist), it could be a nice addition to the language, but this is an own >>

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Dave Abrahams via swift-evolution
on Wed May 04 2016, Adrian Zubarev wrote: > Not sure what to think about the enum cases inside a protocol (if AnyEnum > would > even exist), it could be a nice addition to the language, but this is an own > proposal I guess. > > We should start by adding AnyValue protocol to which all value typ

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Patrick Smith via swift-evolution
** ** On May 4 2016, at 5:37 pm, James Froggatt wrote: > I was thinking that requiring instance properties would mean the value could only be a struct, but rethinking, I realise computed properties would work fine for protocol conformance, so this isn't actually

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread Adrian Zubarev via swift-evolution
Not sure what to think about the enum cases inside a protocol (if AnyEnum would even exist), it could be a nice addition to the language, but this is an own proposal I guess. We should start by adding AnyValue protocol to which all value types conforms. The reason I introduced AnyReference is

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-04 Thread James Froggatt via swift-evolution
I was thinking that requiring instance properties would mean the value could only be a struct, but rethinking, I realise computed properties would work fine for protocol conformance, so this isn't actually true. I agree with your support of focusing on interface. Your implications for AnyObject

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-03 Thread James Froggatt via swift-evolution
An AnyValue protocol seems long overdue. I'm not sure how useful AnyEnum would be, though I support the idea since it could become useful in the future. Begin Message Group: gmane.comp.lang.swift.evolution MsgID: I’d love to see Swift go in this direction with proto

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-03 Thread James Froggatt via swift-evolution
Agreed, AnyObject seems like all we need to limit protocols to reference types. Begin Message Group: gmane.comp.lang.swift.evolution MsgID: on Mon May 02 2016, David Sweeris wrote: > I was just thinking that: > >protocol Foo : reference {} > > might be more to

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-03 Thread Dave Abrahams via swift-evolution
on Mon May 02 2016, David Sweeris wrote: > I was just thinking that: > > protocol Foo : reference {} > > might be more to the point than: > > protocol Foo : class {} > > I know that it’s currently a moot point because classes are the only* > reference-semantics type of type in Swift, but

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-03 Thread Adrian Zubarev via swift-evolution
I’d love to see Swift go in this direction with protocols:                    +---+                    |  Any  |                    +---+---+                        |          +-+-+          |                           |   +--+---+             +-++   | A

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-03 Thread Adrian Zubarev via swift-evolution
+1 Yes please, get rid of the `class` keyword from protocols already and replace it with better implicit protocols. I posted the idea two weeks ago, but no one answered to it: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160418/015568.html Replacing `class` with somethin

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-02 Thread David Sweeris via swift-evolution
On May 2, 2016, at 13:10, John McCall mailto:rjmcc...@apple.com>> wrote: >> On May 2, 2016, at 6:55 AM, David Sweeris via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> I was just thinking that: >> protocol Foo : reference {} >> might be more to the point than: >> protocol Foo :

Re: [swift-evolution] Should we rename "class" when referring to protocol conformance?

2016-05-02 Thread John McCall via swift-evolution
> On May 2, 2016, at 6:55 AM, David Sweeris via swift-evolution > wrote: > I was just thinking that: > protocol Foo : reference {} > might be more to the point than: > protocol Foo : class {} > > I know that it’s currently a moot point because classes are the only* > reference-semantics type of

<    1   2