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 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” val

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

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: >> >> 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 kno

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 not work unless the m

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 >>> wrote: >>> >>>on Fri May 06 2016, Matthew

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 not have value semantics. >> >> Then Arr

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 >> immutable and instances are

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 to have reference types

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, Dave Abrahams via swift-evolution >> wrot

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 2016, Matthew Johnson wrote: On

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 >> immutable and instances are

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Jonathan Hull via swift-evolution
> On May 7, 2016, at 9:53 AM, Tony Parker wrote: > >> >> On May 7, 2016, at 6:06 AM, Jonathan Hull > > wrote: >> >> -1 on this as well. How much does dropping NS really help things anyway? >> >> All it does is force everyone to learn which things still have NS and wh

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 mutable reference type that

Re: [swift-evolution] multi-line string literals.

2016-05-07 Thread L. Mihalkovic via swift-evolution
Regards (From mobile) > On May 8, 2016, at 12:49 AM, Ricardo Parada via swift-evolution > wrote: > > > > It seems to me like this would take care of what is needed 99% of the time. > > I've seen many who don't favor continuation quotes. > > The other option could be triple quote """ and

Re: [swift-evolution] multi-line string literals.

2016-05-07 Thread Ricardo Parada via swift-evolution
It seems to me like this would take care of what is needed 99% of the time. I've seen many who don't favor continuation quotes. The other option could be triple quote """ and make the continuation quote optional. Not using the continuation quote would require the closing triple quote """ >

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 wrote: >> >>On May 6, 2016, at 7:48 PM, Dave

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread David Smith via swift-evolution
> On May 7, 2016, at 11:37 AM, Patrick Smith via swift-evolution > wrote: > > I think everyone possibly has different definitions of what ‘Swift-native > rethinking’ could involve? My thoughts are, the Swift standard library is a > base library of types and algorithms. There’s then a sister l

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

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 pro

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 o

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

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 > extremely > valuable >

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: > 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, M

Re: [swift-evolution] [Accepted] SE-0072: Fully eliminate implicit bridging conversions from Swift

2016-05-07 Thread Zach Waldowski via swift-evolution
On Fri, May 6, 2016, at 11:20 PM, Charles Srstka via swift-evolution wrote: > let int = num as? Int // 5 > let float = num as? Float // 5 > let int32 = num as? Int32 // nil! That specific behavior with Int32 seems to be an oversight in the stdlib. The specific integer types don't get an ObjectiveCB

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 default

Re: [swift-evolution] Proposal: Drop parentheses for initalization from tuple

2016-05-07 Thread Daniele Riccardelli via swift-evolution
Hi Basem, Thank you for the answer. It is indeed a shorthand for unpacking the tuple, which is nothing new to Swift. My suggestion is simply to go from this syntax: let (name, surname) = ("John", "Doe") to this: let name, surname = ("John", "Doe") So it is not about a new feature of the languag

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 > wrote: > > Swift’s

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 7, 2016, at 11:14 AM, Tony Parker wrote: > > Hi Matthew, > >> On May 7, 2016, at 5:22 AM, Matthew Johnson wrote: >> >> >> >> Sent from my iPad >> >>> On May 7, 2016, at 5:03 AM, David Hart via swift-evolution >>> wrote: >>> >>> Hi Tony, >>> >>> I'm very pos

Re: [swift-evolution] Proposal: Drop parentheses for initalization from tuple

2016-05-07 Thread Basem Emara via swift-evolution
Hi Daniele, to me at first glance, it looks like a shorthand for creating multiple variables. I would expect to try something like this later: “print(name); print(surname)”, which of course wouldn’t be the intent. Basem > On May 7, 2016, at 3:42 PM, Daniele Riccardelli via swift-evolution >

[swift-evolution] Proposal: Drop parentheses for initalization from tuple

2016-05-07 Thread Daniele Riccardelli via swift-evolution
Hi all, I was thinking that the syntax for initialization from tuple is a bit more verbose than needed, i.e. why not simply drop the tuple parentheses and go from this : *let* (name, surname) = (*"*John*"*, *"*Doe*"*) to this: *let* name, surname = (*"*John*"*, *"*Doe*"*) similarly to what Pyt

[swift-evolution] unums in Swift?

2016-05-07 Thread Matthew Johnson via swift-evolution
Unums sound very interesting (http://ubiquity.acm.org/article.cfm?id=2913029). I'm wondering if anyone working on numerics in Swift has considered an implementation in the standard library. Matthew Sent from my iPad ___ swift-evolution mailing list s

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Patrick Smith via swift-evolution
I think everyone possibly has different definitions of what ‘Swift-native rethinking’ could involve? My thoughts are, the Swift standard library is a base library of types and algorithms. There’s then a sister library that has serialisation, file reading and writing, and HTTP networking, dates,

[swift-evolution] [Pitch] alternative multiline string literals

2016-05-07 Thread L Mihalkovic via swift-evolution
Please accept my apologies for the repeat… I seem to have more trouble with my emails than the brilliant codebase this team has produced. Best regards LM/ —— Wanting to test the validity of some of the arguments I read on the main proposal, I worked on my own prototype. I think there is

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 s

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Charles Srstka via swift-evolution
On May 6, 2016, at 5:06 PM, Tony Parker via swift-evolution wrote: > > Hi David, > >> On May 6, 2016, at 2:56 PM, David Waite > > wrote: >> >> -1 On the group as-is. I do not believe all of these classes have the >> behavior that would be expected if ‘foun

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Tony Parker via swift-evolution
> On May 7, 2016, at 6:06 AM, Jonathan Hull wrote: > > -1 on this as well. How much does dropping NS really help things anyway? > > All it does is force everyone to learn which things still have NS and which > don’t. It also makes things much more difficult to search for… searching for >

[swift-evolution] [Pitch] multiline string literals

2016-05-07 Thread L Mihalkovic via swift-evolution
Wanting to test the validity of some of the arguments I read on the main proposal, I worked on my own prototype. I think there is more freedom than seem to have been identified so far. The syntax I am exploring is visible here: https://gist.github.com/lmihalkovic/718d1b8f2ae6f7f6ba2ef8da07b64c1

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 >>> property. However, it I (and many others) do believe

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Tony Parker via swift-evolution
Hi Matthew, > On May 7, 2016, at 5:22 AM, Matthew Johnson wrote: > > > > Sent from my iPad > > On May 7, 2016, at 5:03 AM, David Hart via swift-evolution > mailto:swift-evolution@swift.org>> wrote: > >> Hi Tony, >> >> I'm very positive about the proposal but I have similar fears, even if l

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, 2016, at 7:48 PM, Dave Abrahams via swift-evolution >>

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Tony Parker via swift-evolution
Hi David, > On May 7, 2016, at 3:03 AM, David Hart wrote: > > Hi Tony, > > I'm very positive about the proposal but I have similar fears, even if less > strong, to David Waite. I agree that the core libraries can be improved with > time, but it's going to be difficult to rethink them profound

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 Johnson wrote: >> >>On May 5, 2016, at

Re: [swift-evolution] [Pitch] Memos for Struct Calculated Properties

2016-05-07 Thread Jonathan Hull via swift-evolution
There is a subtle, but very important difference. Lazy properties let you defer a calculation until it is needed, but once it is set, it is set. Changing it to clear it would be a mutation. The auto clearing behavior (on mutation of any part of the struct) of the memo proposal allows the calc

Re: [swift-evolution] [Pitch] Memos for Struct Calculated Properties

2016-05-07 Thread Wallacy via swift-evolution
We already have lazy properties to get what you are describing. But we need to wait for the Properties Behavior for the ability to clean a precomputed lazy var. Em sáb, 7 de mai de 2016 11:27, Jonathan Hull via swift-evolution < swift-evolution@swift.org> escreveu: > I saw a message come across a

[swift-evolution] [Pitch] Memos for Struct Calculated Properties

2016-05-07 Thread Jonathan Hull via swift-evolution
I saw a message come across about Memoization, and I thought of using a slightly different approach for similar benefit. I commonly want to store the result of a complex calculation in a private variable in a struct to avoid recalculation cost… but now I have to mark that calculation as *mutati

Re: [swift-evolution] multi-line string literals.

2016-05-07 Thread L. Mihalkovic via swift-evolution
I have a simple working prototype where the following just works Let v = _" "key": "value" "_ I am working on adding Let v = /* this is a template */ _" "key": "value" "_ Let v @string_literal(json) = /* this is a template */ _" "key": "value" "_ This strikes me as far less intru

Re: [swift-evolution] multi-line string literals.

2016-05-07 Thread Brent Royal-Gordon via swift-evolution
Would you all be so kind to take a look at what I suggestedand wrote appr. a week ago? (data lines) This is with using:    \@   for verbatim as-is character data  and    \\ for character data with processing of \ escaped chars and \(var)The advantage of what I describe is that apart from th

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Jonathan Hull via swift-evolution
-1 on this as well. How much does dropping NS really help things anyway? All it does is force everyone to learn which things still have NS and which don’t. It also makes things much more difficult to search for… searching for NS_ gives the results you want quickly vs searching for anything i

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 7, 2016, at 5:03 AM, David Hart via swift-evolution > wrote: > > Hi Tony, > > I'm very positive about the proposal but I have similar fears, even if less > strong, to David Waite. I agree that the core libraries can be improved with > time, but it's going to be d

Re: [swift-evolution] multi-line string literals.

2016-05-07 Thread ted van gaalen via swift-evolution
hello, Have read all? conversations about this subject... Would you all be so kind to take a look at what I suggested and wrote appr. a week ago? (data lines) This is with using: \@ for verbatim as-is character data and \\ for character data with processing of \ escaped chars

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread David Hart via swift-evolution
Hi Tony, I'm very positive about the proposal but I have similar fears, even if less strong, to David Waite. I agree that the core libraries can be improved with time, but it's going to be difficult to rethink them profoundly. NSKeyedArchiver was an improvement, but a fairly mild one, to stay

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 >>> wrote: >>> >>> >>> on Wed May 04 2016, Adrian Zubarev wro

Re: [swift-evolution] Dropping NS Prefix in Foundation

2016-05-07 Thread Patrick Smith via swift-evolution
Should deprecated / unsafe classes be renamed with some sort of prefix, such as UnsafeCoder? Or leave them as original, NSCoder? Just to highlight alternatives should be used instead. > On 7 May 2016, at 8:06 AM, Tony Parker via swift-evolution > wrote: > > Hi David, > >> On May 6, 2016, at

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 typ

Re: [swift-evolution] Case conventions for mixed-case words (like "iPad" and "NaN")

2016-05-07 Thread Patrick Smith via swift-evolution
I would support Option 3. Neither iPad nor NeXT are acronyms, so they needn’t fall under the same rule. Rule A: Acronyms all lowercase, all uppercase URL -> urlString, URLRequest LaTeX -> latexSource, LATEXRenderer GIF -> gifRepresentation, GIFGenerator Rule B: Brand names all lowercase, first u

[swift-evolution] Standardize arguments in closures

2016-05-07 Thread João Nunes via swift-evolution
Hello, In the light of this proposal https://github.com/apple/swift-evolution/blob/master/proposals/0066-standardize-function-type-syntax.md I suggest to do similar for closure arguments. Right now we can define our closure arguments in 3 ways: let closure: (String) -> Int = { value -> Int

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 2016, Matthew Johnson wrote: >> >>On May

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? > > I think I do. What is valu