In Swift 3, this is a compile error, if I use > or <
let a: Int?
guard a > 0 else {return}
guard a < 0 else {return}
>
Optional equality works logically, comparison doesn't.
5 == 5 = true5 == nil = false5 == 6 = falsenil == nil = trueThose all make sense, but these don't:
6 > 5 = true5 > 5 = false5 > nil = ??nil > 5 = ??This type of comparison does not have a simple answer, nor will that answer be the same depending on the use case.