News for hackers. Stuff that matters.
Re:Lightweight API Design in Swift by tigershark on Tuesday November 26, 2019 @11:40AM (#21639897)
(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.
Re:Lightweight API Design in Swift by jbverschoor on Thursday November 28, 2019 @01:23PM (#21659265)
yes, because of memory management. It's a good thing.