[swift-evolution] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread John McCall via swift-evolution
Hi, Swift community! I apologize for the delay in reporting our decision here; between one holiday and the other, it took awhile for the core team to assemble a quorum to talk through this. Proposal Link:

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Dave Abrahams via swift-evolution
> On Dec 19, 2017, at 2:28 PM, Xiaodi Wu via swift-evolution > wrote: > > I disagree. Let’s not reopen what is settled. “Compact” can be a noun just as > “map” and “filter” can; as long as there are no in-place variants, there can > be no ambiguity. > On Tue, Dec

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Xiaodi Wu via swift-evolution
I disagree. Let’s not reopen what is settled. “Compact” can be a noun just as “map” and “filter” can; as long as there are no in-place variants, there can be no ambiguity. On Tue, Dec 19, 2017 at 17:11 Brent Royal-Gordon via swift-evolution < swift-evolution@swift.org> wrote: > On Dec 19, 2017,

Re: [swift-evolution] Add transformers to Codable

2017-12-19 Thread Tony Parker via swift-evolution
Hi Arsen, What’s the difference between providing a method that takes a transformable object on the keyed container protocol and just transforming it yourself before you encode it? - Tony > On Dec 18, 2017, at 8:51 AM, Arsen Gasparyan via swift-evolution > wrote:

[swift-evolution] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Ted Kremenek via swift-evolution
The review of "SE 0192 - Non-Exhaustive Enums" begins now and runs through January 3, 2018. The proposal is available here: https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md Reviews are an important part of the Swift evolution process. All review

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Nevin Brackett-Rozinsky via swift-evolution
If we’re bikeshedding the verb tense then “compactMap” sounds right to me, and adding “ing” would be needlessly verbose. For the non-mapping version, I’d lean toward “compacted”. However, we could also postpone the debate over its spelling until such time as we are actually ready to introduce it.

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Brent Royal-Gordon via swift-evolution
> On Dec 19, 2017, at 8:56 AM, John McCall wrote: > > Therefore, SE-0187 is accepted, with the revision that the new name be > Sequence.compactMap(_:), and with the agreement that we will add > Sequence.compact() when it is possible to do so. I like `compact` as the basis

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Kevin Ballard via swift-evolution
> On Dec 19, 2017, at 2:58 PM, Ted Kremenek wrote: > https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md > > > What is your evaluation of

Re: [swift-evolution] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Jarod Long via swift-evolution
Happy to hear that we went in this direction! Looking forward to the compact method as well. Jarod On Dec 19, 2017, 08:56 -0800, John McCall via swift-evolution , wrote: > Hi, Swift community!  I apologize for the delay in reporting our decision > here; between one

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Howard Lovatt via swift-evolution
As an aside: there seems to be increasingly comments about proposals that say: 1. This was discussed at the evaluation stage and rejected. 2. This is how it is implemented in the patch. And other comments along those lines. Neither the pre-proposal discussions nor the proposed

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Xiaodi Wu via swift-evolution
On Tue, Dec 19, 2017 at 6:31 PM, Kevin Ballard via swift-evolution < swift-evolution@swift.org> wrote: > > On Dec 19, 2017, at 2:58 PM, Ted Kremenek wrote: > > https://github.com/apple/swift-evolution/blob/master/ > proposals/0192-non-exhaustive-enums.md > > >- > >

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Dave Abrahams via swift-evolution
> On Dec 19, 2017, at 3:42 PM, Dave Abrahams via swift-evolution > wrote: > > > >> On Dec 19, 2017, at 2:28 PM, Xiaodi Wu via swift-evolution >> > wrote: >> >> I disagree. Let’s not reopen what is

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Jarod Long via swift-evolution
I don't think anybody wants a big discussion out of this, but if there's a chance that the name will be further revised, then I agree with Nevin, the solo "compacted" is a more appropriate term than "compacting" here. Compacting needs an grammatical object to apply to, so if we wanted to use

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Kevin Ballard via swift-evolution
Isn’t this going to turn both structs and non-C-like enums into types that need to be auto-boxed (as the client won’t be able to rely on knowing the fixed size anymore)? This seems like a performance hazard. -Kevin Ballard > On Dec 19, 2017, at 5:35 PM, Slava Pestov wrote:

Re: [swift-evolution] [swift-evolution-announce] [Accepted with revisions] SE-0187 “Introduce Sequence.filterMap(_:)”

2017-12-19 Thread Paul Cantrell via swift-evolution
Yes. If we’re fussing over the verb tense, “compacted” is clearly correct. Where did “compacting” come from? The API guidelines state: > Prefer to name the nonmutating variant using the verb’s past participle > (usually appending “ed”). …and (emphasis added): > When adding “ed” _is not

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Slava Pestov via swift-evolution
> On Dec 19, 2017, at 3:31 PM, Kevin Ballard via swift-evolution > wrote: > > So I guess I’m saying, I want more thought put on the topic of whether enums > defined in Swift should actually default to non-exhaustive, and I’m now > leaning towards the idea that

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Slava Pestov via swift-evolution
They would not be boxed, but there would be additional indirection required at runtime, using the same mechanism currently used for unspecialized generics. Slava > On Dec 19, 2017, at 6:42 PM, Kevin Ballard wrote: > > Isn’t this going to turn both structs and non-C-like enums

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Xiaodi Wu via swift-evolution
On Tue, Dec 19, 2017 at 11:15 PM, Howard Lovatt via swift-evolution < swift-evolution@swift.org> wrote: > As an aside: there seems to be increasingly comments about proposals that > say: > > 1. This was discussed at the evaluation stage and rejected. > 2. This is how it is implemented in the

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Xiaodi Wu via swift-evolution
On Wed, Dec 20, 2017 at 12:42 AM, Howard Lovatt wrote: > Let me give an example. The recent discussion about filterMap aired in the > discussion stage misgivings about the name; but it went to review with the > name filterMap. At the review stage more misgivings were

Re: [swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types

2017-12-19 Thread Douglas Gregor via swift-evolution
> On Dec 1, 2017, at 9:37 AM, Chris Lattner wrote: > > On Dec 1, 2017, at 12:26 AM, Douglas Gregor > wrote: >>> On Nov 30, 2017, at 10:05 PM, Chris Lattner >> > wrote: >>> Hi

Re: [swift-evolution] [swift-evolution-announce] [Review] SE 0192 - Non-Exhaustive Enums

2017-12-19 Thread Howard Lovatt via swift-evolution
Let me give an example. The recent discussion about filterMap aired in the discussion stage misgivings about the name; but it went to review with the name filterMap. At the review stage more misgivings were raised, the review was returned for amendment. An amended name of compactMap was put

Re: [swift-evolution] Add transformers to Codable

2017-12-19 Thread Goffredo Marocchi via swift-evolution
+1 this is missing functionality at the moment and what still puts tools like Mantle ahead. Sent from my iPhone > On 19 Dec 2017, at 04:18, Charlie Monroe via swift-evolution > wrote: > > For me definitely +1 as it's getting near to what I need to call the Decoding