Listing 5.13: Swift 3 - if-case with where clause


#1

it seems that with Swift 3 perhaps the syntax has changed regarding where clauses. The book gives:

if case 18...35 = age where age >= 21 {
    print("In cool demographic and of drinking age")
}

Xcode 8 is suggesting:

if case 18...35 = age, age >= 21 {
    print("In cool demographic and of drinking age")
}

Is the , taking the place of where and would the statement be read the same way? Just wondering if that is the case.

Edit: This is the case. Detailed here.


#2

thanks for sharing the link