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

2016-05-23 Thread Dave Abrahams via swift-evolution
on Sun May 22 2016, Matthew Johnson wrote: > Are you sure that is Sean’s entire point? I take more away from it than that. > Look at slide 13 here: > https://github.com/boostcon/cppnow_presentations_2012/blob/master/fri/value_semantics/value_semantics.pdf > > “The

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

2016-05-23 Thread Matthew Johnson via swift-evolution
> On May 23, 2016, at 11:19 AM, Patrick Smith wrote: > > I just want to highlight the Photoshop history example. I agree you’d want as > much state and memory shared between steps in the history. > > However, I see nothing wrong with having pointers to pixel buffer, and

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

2016-05-23 Thread Matthew Johnson via swift-evolution
> On May 23, 2016, at 9:22 AM, Dave Abrahams wrote: > > > on Sun May 22 2016, Matthew Johnson > wrote: > >>> On May 22, 2016, at 3:42 PM, Dave Abrahams via swift-evolution >>> wrote: >>> >>> >>> on Sun May

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

2016-05-23 Thread Patrick Smith via swift-evolution
I just want to highlight the Photoshop history example. I agree you’d want as much state and memory shared between steps in the history. However, I see nothing wrong with having pointers to pixel buffer, and that affecting the ‘purity’ of the state. The way Photoshop’s history is implemented,

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

2016-05-22 Thread Matthew Johnson via swift-evolution
> On May 22, 2016, at 3:42 PM, Dave Abrahams via swift-evolution > wrote: > > > on Sun May 22 2016, Matthew Johnson wrote: > >> What I am arguing for is the ability to distinguish aggregates which >> are logically isolated from

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

2016-05-22 Thread Dave Abrahams via swift-evolution
on Sun May 22 2016, Matthew Johnson wrote: > What I am arguing for is the ability to distinguish aggregates which > are logically isolated from aggregates which contain salient > references to shared mutable state. Everything with value semantics is logically

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

2016-05-22 Thread Matthew Johnson via swift-evolution
> On May 22, 2016, at 12:04 PM, Dave Abrahams via swift-evolution > wrote: > > > on Mon May 16 2016, Matthew Johnson wrote: > >>> On May 15, 2016, at 2:01 PM, Dave Abrahams >>> wrote: >>> >>> >>> on Fri May 13

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

2016-05-22 Thread Dave Abrahams via swift-evolution
on Mon May 16 2016, Matthew Johnson wrote: >> On May 16, 2016, at 1:39 AM, Dave Abrahams wrote: >> >> >> on Sun May 15 2016, Tyler Fleming Cloutier > > wrote: >> > >>>On May 15, 2016, at 11:48 AM, Dave

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

2016-05-22 Thread Dave Abrahams via swift-evolution
on Mon May 16 2016, Matthew Johnson wrote: >> On May 15, 2016, at 2:01 PM, Dave Abrahams >> wrote: >> >> >> on Fri May 13 2016, Matthew Johnson > > wrote: >> > >>> Sent from my iPad >>> On May 13, 2016,

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 16, 2016, at 1:38 AM, Tyler Fleming Cloutier via swift-evolution > wrote: > >> >> On May 15, 2016, at 11:17 PM, Tyler Fleming Cloutier via swift-evolution >> > wrote: >> >>> >>> On May 15,

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 16, 2016, at 1:39 AM, Dave Abrahams wrote: > > > on Sun May 15 2016, Tyler Fleming Cloutier > wrote: > >>On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution >> wrote: >> >>on Mon

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 15, 2016, at 1:48 PM, Dave Abrahams wrote: > > > on Mon May 09 2016, Matthew Johnson > wrote: > >>> On May 8, 2016, at 1:51 AM, Dave Abrahams wrote: >>> >>> >>> on Sat May 07 2016, Andrew Trick wrote:

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 16, 2016, at 10:14 AM, Dave Abrahams wrote: > > > on Mon May 16 2016, Matthew Johnson wrote: > >>> On May 15, 2016, at 1:53 PM, Dave Abrahams wrote: >>> >>> >>> on Fri May 13 2016, Matthew Johnson >> >

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 15, 2016, at 2:01 PM, Dave Abrahams wrote: > > > on Fri May 13 2016, Matthew Johnson > wrote: > >> Sent from my iPad >> >>> On May 13, 2016, at 9:12 AM, Dave Abrahams wrote: >>> >>> on Mon May 09

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

2016-05-16 Thread Tino Heth via swift-evolution
hi there, just skimmed through the bigger part of this thread — it's a really interesting discussion, but wouldn't it be worth a topic on its own? The title of this message addresses a much simpler question (that imho still deserves some answers ;-) Tino

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

2016-05-16 Thread Matthew Johnson via swift-evolution
> On May 15, 2016, at 1:53 PM, Dave Abrahams wrote: > > > on Fri May 13 2016, Matthew Johnson > wrote: > >> Sent from my iPad >> >>> On May 13, 2016, at 9:19 AM, Dave Abrahams wrote: >>> >>> on Mon May 09

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

2016-05-16 Thread Vladimir.S via swift-evolution
FWIW, totally agree with this opinion. I also don't understand why "poor beginner who would start typing swift code before reading the manual" becomes so important when we decide to accept or not some new feature or change. Are we working on language that must be used just to teach

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

2016-05-16 Thread Tyler Fleming Cloutier via swift-evolution
> On May 16, 2016, at 2:16 AM, Dave Abrahams wrote: > > > on Mon May 16 2016, Tyler Fleming Cloutier wrote: > Super interesting talk! But consider: isn't a single value type able to represent *multiple* ethereal types? >>> >>> “ethereal?” Does he

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

2016-05-16 Thread Dave Abrahams via swift-evolution
on Mon May 16 2016, Tyler Fleming Cloutier wrote: >>> Super interesting talk! >>> >>> But consider: isn't a single value type able to represent *multiple* >>> ethereal types? >> >> “ethereal?” Does he really use that term? I don't know what it means. > > He does pretty frequently. He also

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

2016-05-16 Thread L. Mihalkovic via swift-evolution
Regards (From mobile) > On May 16, 2016, at 8:39 AM, Dave Abrahams via swift-evolution > wrote: > > >> on Sun May 15 2016, Tyler Fleming Cloutier wrote: >> >>On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution >>

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

2016-05-16 Thread L. Mihalkovic via swift-evolution
Regards (From mobile) > On May 16, 2016, at 8:17 AM, Tyler Fleming Cloutier via swift-evolution > wrote: > > >> On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution >> wrote: >> >> >> on Mon May 09 2016, Matthew Johnson

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

2016-05-16 Thread Tyler Fleming Cloutier via swift-evolution
> On May 15, 2016, at 11:39 PM, Dave Abrahams wrote: > > > on Sun May 15 2016, Tyler Fleming Cloutier wrote: > >>On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution >> wrote: >> >>on Mon May 09 2016, Matthew Johnson

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

2016-05-16 Thread Dave Abrahams via swift-evolution
on Sun May 15 2016, Tyler Fleming Cloutier wrote: >> This implies, therefore, that if salient attributes *define* the >> immutability of the value type, then the public interface is not >> guaranteed to be immutable, since it is allowed to include >> non-salient attributes. For example, a

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

2016-05-16 Thread Dave Abrahams via swift-evolution
on Sun May 15 2016, Tyler Fleming Cloutier wrote: > On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution > wrote: > > on Mon May 09 2016, Matthew Johnson wrote: > > On May 8, 2016, at 1:51 AM, Dave Abrahams >

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

2016-05-16 Thread Tyler Fleming Cloutier via swift-evolution
> On May 15, 2016, at 11:17 PM, Tyler Fleming Cloutier via swift-evolution > wrote: > >> >> On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution >> > wrote: >> >> >> on Mon May 09 2016,

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

2016-05-16 Thread Tyler Fleming Cloutier via swift-evolution
> On May 15, 2016, at 11:48 AM, Dave Abrahams via swift-evolution > wrote: > > > on Mon May 09 2016, Matthew Johnson > wrote: > >>> On May 8, 2016, at 1:51 AM, Dave Abrahams wrote: >>> >>> >>> on Sat May

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

2016-05-15 Thread Dave Abrahams via swift-evolution
on Fri May 13 2016, Matthew Johnson wrote: > Sent from my iPad > >> On May 13, 2016, at 9:12 AM, Dave Abrahams wrote: >> >> >>> on Mon May 09 2016, Matthew Johnson wrote: >>> >>>My claim is that substituting the constraint of “it has value >>>semantics,” while

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

2016-05-15 Thread Dave Abrahams via swift-evolution
on Fri May 13 2016, Matthew Johnson wrote: > Sent from my iPad > >> On May 13, 2016, at 9:19 AM, Dave Abrahams wrote: >> >> >>> on Mon May 09 2016, Matthew Johnson wrote: >>> >>>Remember that the only value semantic reference types are immutable, so >>>the

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

2016-05-15 Thread Dave Abrahams via swift-evolution
on Mon May 09 2016, Matthew Johnson wrote: >> On May 8, 2016, at 1:51 AM, Dave Abrahams wrote: >> >> >> on Sat May 07 2016, Andrew Trick wrote: >> > >>>On May 7, 2016, at 2:04 PM, Dave Abrahams wrote: >>> >>>2. Value types are not

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

2016-05-13 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 13, 2016, at 9:12 AM, Dave Abrahams wrote: > > >> on Mon May 09 2016, Matthew Johnson wrote: >> >>My claim is that substituting the constraint of “it has value >>semantics,” while presumably looser than the PureValue constraint, would

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

2016-05-13 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 13, 2016, at 9:19 AM, Dave Abrahams wrote: > > >> on Mon May 09 2016, Matthew Johnson wrote: >> >>Remember that the only value semantic reference types are immutable, so >>the struct rendition of such types has only immutable

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

2016-05-13 Thread Dave Abrahams via swift-evolution
on Mon May 09 2016, Matthew Johnson wrote: > Remember that the only value semantic reference types are immutable, so > the struct rendition of such types has only immutable properties. > Personally, I don't think that transforming > >struct X { > ... >

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

2016-05-13 Thread Dave Abrahams via swift-evolution
on Mon May 09 2016, Matthew Johnson wrote: > My claim is that substituting the constraint of “it has value > semantics,” while presumably looser than the PureValue constraint, would > not compromise the correctness of your view controller, so not only is > the meaning of

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

2016-05-10 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 10, 2016, at 12:53 AM, Andrew Trick wrote: > > >> On May 9, 2016, at 4:07 PM, Matthew Johnson wrote: >> >> I’m also interested in your feedback on whether a proposal around indirect >> is something worth pursuing right

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

2016-05-10 Thread David Sweeris via swift-evolution
> On May 10, 2016, at 00:53, Andrew Trick via swift-evolution > wrote: > > >> On May 9, 2016, at 4:07 PM, Matthew Johnson wrote: >> >> I’m also interested in your feedback on whether a proposal around indirect >> is something worth

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

2016-05-09 Thread Andrew Trick via swift-evolution
> On May 9, 2016, at 4:07 PM, Matthew Johnson wrote: > > I’m also interested in your feedback on whether a proposal around indirect is > something worth pursuing right now or whether that is something that should > wait until after Swift 3. I’m not prepared to

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

2016-05-09 Thread Matthew Johnson via swift-evolution
> On May 9, 2016, at 1:03 PM, Andrew Trick wrote: > > >> On May 9, 2016, at 8:34 AM, Matthew Johnson > > wrote: >> >>> I would prefer to wait until indirect structs and improved CoW support have >>> had more

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

2016-05-09 Thread Matthew Johnson via swift-evolution
> On May 8, 2016, at 1:51 AM, Dave Abrahams wrote: > > > on Sat May 07 2016, Andrew Trick wrote: > >>On May 7, 2016, at 2:04 PM, Dave Abrahams wrote: >> >>2. Value types are not "pure" values if any part of the aggregate >>

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

2016-05-09 Thread Matthew Johnson via swift-evolution
> On May 8, 2016, at 1:19 AM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson > wrote: > >>On May 7, 2016, at 4:04 PM, Dave Abrahams wrote: >> >>on Sat May 07 2016, Matthew Johnson wrote:

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

2016-05-09 Thread Matthew Johnson via swift-evolution
> On May 8, 2016, at 12:51 AM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson > wrote: > >>> On May 7, 2016, at 3:03 PM, Dave Abrahams wrote: >>> >>> >>> on Sat May 07 2016, Matthew Johnson

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

2016-05-09 Thread Matthew Johnson via swift-evolution
> On May 8, 2016, at 1:02 AM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson > wrote: > >>> >>> You haven't answered this question. How would you use this protocol? >> >> I think the best example was given by Andy

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

2016-05-09 Thread Andrew Trick via swift-evolution
> On May 9, 2016, at 8:34 AM, Matthew Johnson wrote: > >> I would prefer to wait until indirect structs and improved CoW support have >> had more discussion. > > I've been thinking a lot about Dave's desire to "mandate" that value semantic > types must be value types

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

2016-05-09 Thread Andrew Trick via swift-evolution
> On May 7, 2016, at 11:51 PM, Dave Abrahams wrote: > >> Does Array have value semantics then only if T also has value >> semantics? > > This is a great question; I had to rewrite my response four times. > > In my world, an Array always has value semantics if you respect

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

2016-05-08 Thread Andrew Trick via swift-evolution
> On May 7, 2016, at 6:43 PM, Matthew Johnson via swift-evolution > wrote: > > If I read Andrew’s post correctly it sounds like it may also be of use to the > optimizer in some cases. I’ll just requote Dave’s example, which made perfect sense to me (so I’m not

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

2016-05-08 Thread L Mihalkovic via swift-evolution
>>The primary reasons I can think of for creating reference types with >>value >>semantics are avoiding copying everything all the time or using >>inheritance. (I >>could also list pre-existing types here but am not as concerned with >>those) >> >>

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

2016-05-08 Thread Tyler Fleming Cloutier via swift-evolution
> On May 7, 2016, at 10:39 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Tyler Fleming Cloutier > wrote: > >>> On May 7, 2016, at 12:52 PM, Dave Abrahams wrote: >>> >>> >>> on Fri May 06 2016, Tyler Fleming

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

2016-05-08 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Andrew Trick wrote: > On May 7, 2016, at 2:04 PM, Dave Abrahams wrote: > > 2. Value types are not "pure" values if any part of the aggregate > contains a > reference whose type does not have value semantics. > > Then

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

2016-05-08 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Matthew Johnson wrote: > On May 7, 2016, at 4:04 PM, Dave Abrahams wrote: > > on Sat May 07 2016, Matthew Johnson wrote: > > I've been thinking about this further and can now state my position > more > clearly > and

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

2016-05-08 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Matthew Johnson wrote: >> >> You haven't answered this question. How would you use this protocol? > > I think the best example was given by Andy when discussing pure > functions. Maybe I want to write a generic function and ensure it is > pure. I can only do this if I

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Matthew Johnson wrote: >> On May 7, 2016, at 3:03 PM, Dave Abrahams wrote: >> >> >> on Sat May 07 2016, Matthew Johnson wrote: >> >>> This depends on the type. For types representing resources, etc it works >>> just >>> fine. But for models it does

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Tyler Fleming Cloutier wrote: >> On May 7, 2016, at 12:52 PM, Dave Abrahams wrote: >> >> >> on Fri May 06 2016, Tyler Fleming Cloutier wrote: >> > >>>On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution >>>

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 7:07 PM, Andrew Trick wrote: > > >> On May 7, 2016, at 2:04 PM, Dave Abrahams > > wrote: >> >>> 2. Value types are not "pure" values if any part of the aggregate contains a >>> reference whose type does

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 3:03 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson wrote: > >> This depends on the type. For types representing resources, etc it works just >> fine. But for models it does not work unless the model subgraph is entirely >>

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 4:04 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson > wrote: > >> I've been thinking about this further and can now state my position more >> clearly >> and concisely. >> >> 1. If we're going

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 3:53 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson wrote: > >> Sent from my iPad >> >> On May 7, 2016, at 2:21 AM, Andrew Trick via swift-evolution >> wrote: >> >>On May 6, 2016, at 5:48 PM,

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 3:48 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson > wrote: > >> Sent from my iPad >> >>> On May 6, 2016, at 8:54 PM, Dave Abrahams wrote: >>> >>> on Fri May 06

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

2016-05-07 Thread Matthew Johnson via swift-evolution
> On May 7, 2016, at 3:03 PM, Dave Abrahams wrote: > > > on Sat May 07 2016, Matthew Johnson wrote: > >> This depends on the type. For types representing resources, etc it works just >> fine. But for models it does not work unless the model subgraph is entirely >>

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

2016-05-07 Thread Andrew Trick via swift-evolution
> On May 7, 2016, at 2:04 PM, Dave Abrahams wrote: > >> 2. Value types are not "pure" values if any part of the aggregate contains a >> reference whose type does not have value semantics. > > Then Array is not a “pure” value (the buffer contained in an > Array is a

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

2016-05-07 Thread Tyler Fleming Cloutier via swift-evolution
> On May 7, 2016, at 12:52 PM, Dave Abrahams wrote: > > > on Fri May 06 2016, Tyler Fleming Cloutier wrote: > >>On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution >> wrote: >> >>on Fri May 06 2016, Matthew Johnson

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Tyler Fleming Cloutier wrote: > That is a drastic solution indeed! How would this impact things like > Array? While Array itself has value semantics, the aggregate > obviously does not as it contains references which usually be mutated >

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Tyler Fleming Cloutier wrote: > No, I'm sorry; this “deep-vs-shallow” thing is a fallacy that comes from > not understanding the boundaries of your value. Or, put more > solicitously: sure, you can look at the world that way, but it just > makes everything

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Matthew Johnson wrote: > I've been thinking about this further and can now state my position more > clearly > and concisely. > > 1. If we're going to have reference types with value semantics the boundary of > the value must extend through the reference to the value of the

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Andrew Trick wrote: > On May 6, 2016, at 5:48 PM, Dave Abrahams via swift-evolution > wrote: > > I don’t mean to imply that it is the *only* valuable > property. However, it I (and many others) do believe it is an >

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Sat May 07 2016, Matthew Johnson wrote: > This depends on the type. For types representing resources, etc it works just > fine. But for models it does not work unless the model subgraph is entirely > immutable and instances are unique. > I agree that it isn't a good idea to provide a

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

2016-05-07 Thread Dave Abrahams via swift-evolution
on Fri May 06 2016, Tyler Fleming Cloutier wrote: > On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution > wrote: > > on Fri May 06 2016, Matthew Johnson wrote: > > On May 6, 2016, at 7:48 PM, Dave Abrahams via swift-evolution >

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

2016-05-07 Thread Matthew Johnson via swift-evolution
I've been thinking about this further and can now state my position more clearly and concisely. 1. If we're going to have reference types with value semantics the boundary of the value must extend through the reference to the value of the object. Two instances may have the same logical value

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

2016-05-07 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 7, 2016, at 2:21 AM, Andrew Trick via swift-evolution > wrote: > > >>> On May 6, 2016, at 5:48 PM, Dave Abrahams via swift-evolution >>> wrote: >>> >>> I don’t mean to imply that it is the *only* valuable

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

2016-05-07 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 6, 2016, at 11:19 PM, Tyler Fleming Cloutier > wrote: > > >> On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution >> wrote: >> >> >> on Fri May 06 2016, Matthew Johnson wrote: >> >>>On May 6,

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

2016-05-07 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 6, 2016, at 8:54 PM, Dave Abrahams wrote: > > >> on Fri May 06 2016, Matthew Johnson wrote: >> >>On May 6, 2016, at 7:48 PM, Dave Abrahams via swift-evolution >> wrote: >> >>on Thu May 05 2016, Matthew

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

2016-05-07 Thread Tyler Fleming Cloutier via swift-evolution
> On May 4, 2016, at 3: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 >>>

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

2016-05-07 Thread Adrian Zubarev via swift-evolution
For me and my English its become hard to follow where this is going right now. Let’s stick with my `AnyReference` and `AnyValue` protocols just for the example. Do I get your intention right that we discuss here about value types that are constructed from their deepest only from other value

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

2016-05-07 Thread Tyler Fleming Cloutier via swift-evolution
> On May 5, 2016, at 8:02 PM, Dave Abrahams via swift-evolution > wrote: > > > on Thu May 05 2016, Matthew Johnson > wrote: > >>On May 5, 2016, at 4:59 PM, Dave Abrahams wrote: >> >>on Wed May 04

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

2016-05-07 Thread Andrew Trick via swift-evolution
> On May 6, 2016, at 5:48 PM, Dave Abrahams via swift-evolution > wrote: > >> I don’t mean to imply that it is the *only* valuable >> property. However, it I (and many others) do believe it is an extremely >> valuable >> property in many cases. Do you disagree? > >

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

2016-05-06 Thread Tyler Fleming Cloutier via swift-evolution
> On May 6, 2016, at 9:19 PM, Tyler Fleming Cloutier via swift-evolution > wrote: > >> >> On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution >> > wrote: >> >> >> on Fri May 06 2016, Matthew

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

2016-05-06 Thread Tyler Fleming Cloutier via swift-evolution
> On May 6, 2016, at 6:54 PM, Dave Abrahams via swift-evolution > wrote: > > > on Fri May 06 2016, Matthew Johnson > wrote: > >>On May 6, 2016, at 7:48 PM, Dave Abrahams via swift-evolution >>

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

2016-05-06 Thread David Sweeris via swift-evolution
> On May 6, 2016, at 19:48, Dave Abrahams via swift-evolution > wrote: > > Sorry, this is the first mention I can find in the whole thread, honest. > Oh, it was a different thread. Joe describes it as a protocol for > “types that represent fully self-contained

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

2016-05-06 Thread Dave Abrahams via swift-evolution
on Fri May 06 2016, Matthew Johnson wrote: > On May 6, 2016, at 7:48 PM, Dave Abrahams via swift-evolution > wrote: > > on Thu May 05 2016, Matthew Johnson wrote: > > On May 5, 2016, at 10:02 PM, Dave Abrahams >

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

2016-05-06 Thread Dave Abrahams via swift-evolution
on Thu May 05 2016, Matthew Johnson wrote: > On May 5, 2016, at 10:02 PM, Dave Abrahams > wrote: > > on Thu May 05 2016, Matthew Johnson wrote: > > On May 5, 2016, at 4:59 PM, Dave Abrahams >

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

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

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

2016-05-05 Thread Matthew Johnson via swift-evolution
> On May 5, 2016, at 4:59 PM, Dave Abrahams wrote: > > > 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

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

2016-05-05 Thread David Sweeris via swift-evolution
> On May 5, 2016, at 6:55 PM, Dave Abrahams wrote: > > > on Thu May 05 2016, David Sweeris wrote: > >> I meant leave `struct` and `enum` the way they are, and introduce a >> `different_struct` and `different_enum` (placeholder names, of course) >> which enforced the “no

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

2016-05-05 Thread David Sweeris via swift-evolution
> On May 5, 2016, at 5:01 PM, Dave Abrahams wrote: > > > on Wed May 04 2016, David Sweeris wrote: > >>> On May 4, 2016, at 13:29, Dave Abrahams via swift-evolution >>> wrote: >>> >>> In order for something like AnyValue to have meaning, we

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

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,

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

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

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

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

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

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

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

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 conducta...@ntlworld.com 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

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

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:

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

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* >

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  |                    +---+---+                        |          +-+-+          |                           |   +--+---+             +-++   |

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

  1   2   >