Re:Why Swift Guard Should Be Avoided
by rimantas on Saturday January 02, 2016 @06:19AM
(#10825859)
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/
[ Parent
| on HN ]
Re:Why Swift Guard Should Be Avoided
by cellularmitosis on Friday January 08, 2016 @03:20PM
(#10867899)
Exactly. Here's a version of his refactored code which re-replaces the if statements with guard statements: https://gist.github.com/cellularmitosis/9a175facd5fe260403f1