I was converting from swift 2 to swift 3. I noticed that I cannot convert a boolean value to integer value in swift 3 :\\ .
let p1 = (\"a\" == \"a\") //true
You could use hashValue property:
let active = true active.hashValue // returns 1 active = false active.hashValue // returns 0