|
|
|
|
|
by anon4
4398 days ago
|
|
Heh. Reminds me of when I correct people for if var == true {...}
or (and I have actually seen this) if (<expression> == true) {
return true;
} else {
return false;
}
I sometimes think that simply giving those 5 lines to a person and observing if they make a face like you've handed them a bucket full of day-old fish is a better test for programming aptitude than anything. |
|
However in the strongly typed swift I don't think it will be a problem as I suspect (but haven't read/tested enough yet to confirm) that only false and nil will be falsy and that comparison with true will throw errors if var isn't of bool type.