Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-11 Thread Haravikk via swift-evolution
> On 10 Jun 2016, at 21:15, Thorsten Seitz via swift-evolution > wrote: > > -1 > >> Am 10.06.2016 um 21:10 schrieb Brent Royal-Gordon via swift-evolution >> >: >> >> if case .some(let Point.cartesian(x,

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-11 Thread David Hart via swift-evolution
-1 I have similar concerns on the mental ambiguity of the direction this is going. > On 10 Jun 2016, at 22:15, Thorsten Seitz via swift-evolution > wrote: > > -1 > >> Am 10.06.2016 um 21:10 schrieb Brent Royal-Gordon via swift-evolution >>

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Thorsten Seitz via swift-evolution
> Am 10.06.2016 um 22:26 schrieb Xiaodi Wu : > > > > On Fri, Jun 10, 2016 at 3:15 PM, Thorsten Seitz via swift-evolution > > wrote: > -1 > >> Am 10.06.2016 um 21:10 schrieb Brent Royal-Gordon via

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread L. Mihalkovic via swift-evolution
> On Jun 10, 2016, at 10:32 PM, Xiaodi Wu wrote: > >> On Fri, Jun 10, 2016 at 3:24 PM, Brandon Knope wrote: >> Your patience in the face of my hysterics is truly inspirational (no >> sarcasm!). >> >> I just want to say up front that I hope none of my

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Roth Michaels via swift-evolution
On Fri, Jun 10 2016 at 03:42:34 PM, Christopher Kornher via swift-evolution wrote: > -1 > > An alternative would be to: > > 1) State clearly in all relevant documentation that ‘where’ filters and > ‘while’ terminates. > 2) Eliminate the use of ‘where’ within ‘while’

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 3:15 PM, Thorsten Seitz via swift-evolution < swift-evolution@swift.org> wrote: > -1 > > Am 10.06.2016 um 21:10 schrieb Brent Royal-Gordon via swift-evolution < > swift-evolution@swift.org>: > > if case .some(let Point.cartesian(x, y)) where x < y = >

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Brandon Knope via swift-evolution
Your patience in the face of my hysterics is truly inspirational (no sarcasm!). I just want to say up front that I hope none of my emails come across as an attack. They are just coming from a place of passion. Based on your rational responses to me, I think you do understand that :) I am not

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 3:04 PM, Christopher Kornher wrote: > > On Jun 10, 2016, at 1:52 PM, Xiaodi Wu via swift-evolution < > swift-evolution@swift.org> wrote: > > On Fri, Jun 10, 2016 at 2:38 PM, Brandon Knope via swift-evolution < > swift-evolution@swift.org> wrote: > >>

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Thorsten Seitz via swift-evolution
-1 > Am 10.06.2016 um 21:10 schrieb Brent Royal-Gordon via swift-evolution > : > > if case .some(let Point.cartesian(x, y)) where x < y = > json["rect"]?["origin"].flatMap(.init(rawValue:)) { … } This: `where x < y = json[…]` is *very* unreadable and probably

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Christopher Kornher via swift-evolution
> On Jun 10, 2016, at 1:52 PM, Xiaodi Wu via swift-evolution > wrote: > > On Fri, Jun 10, 2016 at 2:38 PM, Brandon Knope via swift-evolution > > wrote: > Thanks for the laugh! > > The last week or so is

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 2:42 PM, Christopher Kornher wrote: > -1 > > An alternative would be to: > > 1) State clearly in all relevant documentation that ‘where’ filters and > ‘while’ terminates. > 2) Eliminate the use of ‘where’ within ‘while’ clauses. > > This seems pretty

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 2:38 PM, Brandon Knope via swift-evolution < swift-evolution@swift.org> wrote: > Thanks for the laugh! > > The last week or so is actually stressing me out about the direction where > swift is going… > > I hope it is just a fleeting feeling but that remains to be seen. I

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Christopher Kornher via swift-evolution
-1 An alternative would be to: 1) State clearly in all relevant documentation that ‘where’ filters and ‘while’ terminates. 2) Eliminate the use of ‘where’ within ‘while’ clauses. This seems pretty straightforward to me. The principle in #1 should be easy for even beginners

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Brandon Knope via swift-evolution
Thanks for the laugh! The last week or so is actually stressing me out about the direction where swift is going… I hope it is just a fleeting feeling but that remains to be seen. I am beginning to think my interests and taste are no longer aligning with the communities or core teams.

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 2:08 PM, Erica Sadun wrote: > > > On Jun 10, 2016, at 1:06 PM, Rob Norback via swift-evolution < > swift-evolution@swift.org> wrote: > > > > Following Brent's logic that the for-in where should mimic the switch > statement functionality, then this

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Xiaodi Wu via swift-evolution
On Fri, Jun 10, 2016 at 2:10 PM, Brent Royal-Gordon via swift-evolution < swift-evolution@swift.org> wrote: > > Unlike in switch statements and do loops, a for-in loop's where-clause > is separated from the pattern it modifies. > > (I think "do loops" is supposed to be "do-catch statements"?) > >

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread L. Mihalkovic via swift-evolution
Goodness... where is this language going. > On Jun 10, 2016, at 9:08 PM, Erica Sadun via swift-evolution > wrote: > > >> On Jun 10, 2016, at 1:06 PM, Rob Norback via swift-evolution >> wrote: >> >> Following Brent's logic that the

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Brent Royal-Gordon via swift-evolution
> Following Brent's logic that the for-in where should mimic the switch > statement functionality, then this example: > > for (eachKey, eachValue) > where eachValue > 5 > in theKeyValuePairs {... } > > Should read like: > > for (eachKey, eachValue where eachValue > 5) in theKeyValuePairs

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Rob Norback via swift-evolution
Following Brent's logic that the for-in where should mimic the switch statement functionality, then this example: for (eachKey, eachValue) where eachValue > 5 in theKeyValuePairs {... } Should read like: for (eachKey, eachValue where eachValue > 5) in theKeyValuePairs {... } And, for

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Brent Royal-Gordon via swift-evolution
> Unlike in switch statements and do loops, a for-in loop's where-clause is > separated from the pattern it modifies. (I think "do loops" is supposed to be "do-catch statements"?) > for case? pattern in expression where-clause? code-block > > case-item-list → pattern where-clause? | pattern

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Erica Sadun via swift-evolution
> On Jun 10, 2016, at 1:06 PM, Rob Norback via swift-evolution > wrote: > > Following Brent's logic that the for-in where should mimic the switch > statement functionality, then this example: > > for (eachKey, eachValue) > where eachValue > 5 > in

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread L. Mihalkovic via swift-evolution
-1 makes no sense to me... > On Jun 9, 2016, at 9:05 PM, Erica Sadun via swift-evolution > wrote: > > Gist: https://gist.github.com/erica/86f00c1b8ebf45dcf3507ae6ef642b57 > > Regularizing Where grammar > Proposal: TBD > Author: Brent Royal-Gordon, Erica Sadun >

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-10 Thread Brent Royal-Gordon via swift-evolution
> I am curious, is there any conflict with the reasoning to move where here > compared to the accepted SE-0081 "Move where clause to end of declaration" > https://lists.swift.org/pipermail/swift-evolution-announce/2016-May/000161.html > > We moved the where clause to before the body in one case

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Dany St-Amant via swift-evolution
> Le 9 juin 2016 à 15:05, Erica Sadun via swift-evolution > a écrit : > > Gist: https://gist.github.com/erica/86f00c1b8ebf45dcf3507ae6ef642b57 > > Regularizing Where grammar > Proposal: TBD > Author: Brent Royal-Gordon, Erica Sadun > Status: TBD > Review manager:

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Rob Norback via swift-evolution
After some research I finally get the reference. lol La donna è mobile Qual piuma al vento, Muta d'accento — e di pensiero. Sempre un amabile, Leggiadro viso, In pianto o in riso, — è menzognero. È sempre misero Chi a lei s'affida, Chi le confida — mal cauto il cuore! Pur mai non sentesi Felice

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread L. Mihalkovic via swift-evolution
> On Jun 9, 2016, at 11:37 PM, Erica Sadun via swift-evolution > wrote: > >> On Jun 9, 2016, at 3:18 PM, Rob Norback wrote: >> >> Def like this change, but Erica I'm wondering what changed your mind about >> the syntax since the last I read you

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Erica Sadun via swift-evolution
On Jun 9, 2016, at 3:18 PM, Rob Norback wrote: > > Def like this change, but Erica I'm wondering what changed your mind about > the syntax since the last I read you still were concerned by the ambiguity > between filtering and exiting. My concerns remain. However, after

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Rob Norback via swift-evolution
Def like this change, but Erica I'm wondering what changed your mind about the syntax since the last I read you still were concerned by the ambiguity between filtering and exiting. On Thu, Jun 9, 2016 at 1:54 PM Erica Sadun via swift-evolution < swift-evolution@swift.org> wrote: > On Jun 9, 2016,

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Erica Sadun via swift-evolution
> On Jun 9, 2016, at 1:57 PM, Haravikk wrote: > > I think the idea here is for a change from the first to the second of: > > for eachValue in theValues where eachValue.isOdd { … } > for eachValue where eachValue.isOdd in theValues { … } > > I’m kind of

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Brandon Knope via swift-evolution
I believe this is for case conditionals in for loops only. There is another proposal to remove where from for loops I believe. I am curious, is there any conflict with the reasoning to move where here compared to the accepted SE-0081 "Move where clause to end of declaration"

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Haravikk via swift-evolution
I think the idea here is for a change from the first to the second of: for eachValue in theValues where eachValue.isOdd { … } for eachValue where eachValue.isOdd in theValues { … } I’m kind of split on this for a few reasons. The first is that it doesn’t ready quite as well

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Brandon Knope via swift-evolution
Can you include an example? I find it hard to visualize for case? pattern where-clause? in expression code-block Thanks, Brandon > On Jun 9, 2016, at 3:05 PM, Erica Sadun via swift-evolution > wrote: > > Gist:

Re: [swift-evolution] [DRAFT] Regularizing Where Grammar (was Re: Add a while clause to for loops)

2016-06-09 Thread Christopher Kornher via swift-evolution
+1 > On Jun 9, 2016, at 1:05 PM, Erica Sadun via swift-evolution > wrote: > > Gist: https://gist.github.com/erica/86f00c1b8ebf45dcf3507ae6ef642b57 > > > Regularizing Where grammar > > Proposal: TBD >