3 ms·
That says nothing about the guard itself, only about code organization. Ifs in some of his refactored functions can be as well guards. I think this is much bet
by rimantas 11y ago
That says nothing about the guard itself, only about code organization. Ifs in some of his refactored functions can be as well guards.
I think this is much better: http://radex.io/swift/guard/ http://radex.io/swift/guard/
- cellularmitosis 11y agoExactly. Here's a version of his refactored code which re-replaces the if statements with guard statements: https://gist.github.com/cellularmitosis/9a175facd5fe260403f1 https://gist.github.com/cellularmitosis/9a175facd5fe260403f1