Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-06-06 Thread Goffredo Marocchi via swift-evolution
Loved the insight about the positive net effect on language symmetry, quite important yet sometimes the unsung hero of such discussions :). Sent from my iPhone > On 6 Jun 2016, at 08:26, David Hart via swift-evolution > wrote: > > >>• What is your evaluation of the proposal? > > +1 I’ve

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-06-06 Thread David Hart via swift-evolution
> • What is your evaluation of the proposal? +1 I’ve always been annoyed by the complicated grammar of condition clauses. This proposal simplifies them and makes them easier to understand and teach. Especially, I regret that the syntax for A && B is different than B && A when A is a bool

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-06-05 Thread Fabian Ehrentraud via swift-evolution
• What is your evaluation of the proposal? -1 for the current proposal, +1 for being able to mix regular boolean expressions and `let` expressions. • Is the problem being addressed significant enough to warrant a change to Swift? Yes, not being able to mix different clause types feels artificial

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-06-03 Thread Ben Rimmington via swift-evolution
+1 I think the new guard/if/while grammar is an improvement. We have a limited number of ASCII punctuation characters, and the semicolon is currently underused in Swift. -- Ben _

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-30 Thread David Rönnqvist via swift-evolution
> • What is your evaluation of the proposal? Mixed. But I think it leans towards the negative. At first I thought it was a big improvement, but after looking at how our team currently writes guard statements, the where clause is almost always using the unwrapped value (as opposed to an

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-30 Thread Zach Waldowski via swift-evolution
I have concerns. Responses inline. Sincerely, Zachary Waldowski z...@waldowski.me On Fri, May 27, 2016, at 12:11 PM, Joe Groff via swift-evolution wrote: > • What is your evaluation of the proposal? -1. Neither semicolon-based nor newline-based conditionals strike me as sufficiently better

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-29 Thread Xiaodi Wu via swift-evolution
The chapter on optionals. Right in the thick of things about if let binding, pattern matching, etc. It's a bit of a digression from the main flow of things. In the PDF version it's p. 87 (at least, by Acrobat's reckoning). On Sun, May 29, 2016 at 15:28 Brandon Knope wrote: > What chapter is this

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-29 Thread Brandon Knope via swift-evolution
What chapter is this in? I own this great book and would like to see what you are referring to! Thanks, Brandon > On May 29, 2016, at 11:32 AM, Xiaodi Wu wrote: > > I totally agree with Brandon that it makes sense in the context. But I > disagree with you: the behavior certainly isn't consis

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-29 Thread Xiaodi Wu via swift-evolution
I totally agree with Brandon that it makes sense in the context. But I disagree with you: the behavior certainly isn't consistent. Those are two orthogonal evaluations. Personally, I've never been tripped up by the two different meanings of where clauses and I've used both. Yet, when it was presen

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-29 Thread Thorsten Seitz via swift-evolution
Totally agree with Brandon. I don’t think that behavior is inconsistent. -Thorsten > Am 28.05.2016 um 22:18 schrieb Brandon Knope via swift-evolution > : > > Doesn't this contextually make sense though? > > for, when read: > "for each value in collection where some condition is met" do this l

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Chris Lattner via swift-evolution
> On May 28, 2016, at 12:13 AM, Patrick Smith via swift-evolution > wrote: > A different train of thought: could semicolons allow the closure ambiguity to > be resolved that Chris brought up a couple of months ago? e.g. > I imagine it wouldn’t, as the parser would always catch that first ‘{‘ as

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Brandon Knope via swift-evolution
Doesn't this contextually make sense though? for, when read: "for each value in collection where some condition is met" do this loop while, when read: "while some condition where this constraint is met" do this loop It could just be because I know the behavior and am use to it, but I think it

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Xiaodi Wu via swift-evolution
I'm just gotta quote from Advanced Swift: Note that the where clause [in a for loop] does not work like the where clause in a while loop. In a while loop, iteration stops once the value is false, whereas in a for loop, it functions like filter. On Sat, May 28, 2016 at 16:00 Haravikk wrote: > >

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Haravikk via swift-evolution
> On 28 May 2016, at 20:21, Xiaodi Wu wrote: > > There's already an inconsistency in where clause behavior for `if` and > `while` versus `for` loops. It's nice IMO that the former uses are eliminated > in this proposal. Can you give an example? That sounds like something that should be addres

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Xiaodi Wu via swift-evolution
There's already an inconsistency in where clause behavior for `if` and `while` versus `for` loops. It's nice IMO that the former uses are eliminated in this proposal. Again, whether declaring multiple variables after a single let is a good idea or not is, I think, out of scope for this proposal. I

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Thorsten Seitz via swift-evolution
> Am 28.05.2016 um 20:28 schrieb Haravikk via swift-evolution > : > >> On 27 May 2016, at 20:11, Joe Groff via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> • What is your evaluation of the proposal? > > Uncertain. I understand the intent behind it, but personally I

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Haravikk via swift-evolution
> On 27 May 2016, at 20:11, Joe Groff via swift-evolution > wrote: > > • What is your evaluation of the proposal? Uncertain. I understand the intent behind it, but personally I really like the where clause as it covers most cases where I need to mix and match, and I feel that it’s very

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-28 Thread Patrick Smith via swift-evolution
> On 28 May 2016, at 10:37 AM, Matthew Johnson via swift-evolution > wrote: > > But I don't know what that has to do with the fact that newline can be used > as an alternative. It's just an alternate separator. As far as I know, > everywhere semicolons are used as separators newlines are acc

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Brandon Knope via swift-evolution
I was using the word that the proposal author even used! Couldn't the same be said for the comma though? Sent from my iPad > On May 27, 2016, at 10:48 PM, Jacob Bandes-Storch wrote: > > I haven't had time to carefully read this whole thread, but I don't think I > agree that this syntax is "ug

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Jacob Bandes-Storch via swift-evolution
I haven't had time to carefully read this whole thread, but I don't think I agree that this syntax is "uglier". Isn't it true that semicolons are used regularly in English; that they delimit separate clauses, boolean or otherwise; and that the proposed syntax mirrors English grammar pretty well (p

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Brandon Knope via swift-evolution
As a *user* of the language, I find it a little disconcerting that we would make the syntax uglier just to serve the grammar. Where is the benefit to the user with this? Especially at the cost of making it slightly uglier? And sorry, but what is a boolean assertion? :embarrassed face: Brandon

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Matthew Johnson via swift-evolution
> On May 27, 2016, at 7:50 PM, Xiaodi Wu wrote: > > I don't believe that was the case with the semicolons in the original for;; > loop, was it? No, I don’t believe so, but that’s gone now. And it is pretty uncommon to see `for` loop clauses on multiple lines. Not so with `guard`. > On Fri,

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Xiaodi Wu via swift-evolution
I don't believe that was the case with the semicolons in the original for;; loop, was it? On Fri, May 27, 2016 at 20:37 Matthew Johnson via swift-evolution < swift-evolution@swift.org> wrote: > > > Sent from my iPad > > On May 27, 2016, at 7:22 PM, Erica Sadun wrote: > > > On May 27, 2016, at 6:1

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 27, 2016, at 7:22 PM, Erica Sadun wrote: > > >> On May 27, 2016, at 6:19 PM, Matthew Johnson wrote: Also, can someone refer me to an example of this statement: "This proposal resolves this problem by retaining commas as separators within clauses (as >>>

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Erica Sadun via swift-evolution
> On May 27, 2016, at 6:19 PM, Matthew Johnson wrote: >>> Also, can someone refer me to an example of this statement: "This proposal >>> resolves this problem by retaining commas as separators within clauses (as >>> used elsewhere in Swift) and introducing semicolons to separate distinct >>> k

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On May 27, 2016, at 7:13 PM, Erica Sadun via swift-evolution > wrote: > > >> On May 27, 2016, at 3:06 PM, Brandon Knope via swift-evolution >> wrote: >> >> Second, I have really gotten use to not needing to use semicolons, and this >> proposal seems to use/require the

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Erica Sadun via swift-evolution
> On May 27, 2016, at 3:06 PM, Brandon Knope via swift-evolution > wrote: > > Second, I have really gotten use to not needing to use semicolons, and this > proposal seems to use/require them in very common situations. > > After shedding the requirement of semicolons from ObjC…now we will have

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Brandon Knope via swift-evolution
I am giving a -1 for this proposal. While I am sure it has merit, I am finding it to be a really technical change (meaning it makes the language look more technical at the expense of some of its beauty) First, I do not find this example very compelling: guard x == 0, let y = optional w

Re: [swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread L Mihalkovic via swift-evolution
> On May 27, 2016, at 9:11 PM, Joe Groff via swift-evolution > wrote: > > Hello Swift community, > > The review of SE-0099 “Restructuring Condition Clauses” begins now and runs > through June 3, 2016. The proposal is available here: > > > https://github.com/apple/swift-evolution/blo

[swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

2016-05-27 Thread Joe Groff via swift-evolution
Hello Swift community, The review of SE-0099 “Restructuring Condition Clauses” begins now and runs through June 3, 2016. The proposal is available here: https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md Reviews are an important part of the Swift ev