4 ms·
(s1: String, s2: String) -> Bool in return s1 > s2 } In nested closures you can’t use the $0 syntax, swift type inference is pretty poor compared to F# and
by tigershark 7y ago
(s1: String, s2: String) -> Bool in
return s1 > s2
}
In nested closures you can’t use the $0 syntax, swift type inference is pretty poor compared to F# and so a lot of time I have to explicitly specify the types and the in is much less clear than => or ->. To make it even more frustrating I have to specify the @escaping attribute in a lot of methods that accept closures as an argument.
- jbverschoor 7y agoyes, because of memory management. It's a good thing.