News for hackers. Stuff that matters.
Re:Simpler UI Logic With Finite State Machines by brandonhorst on Monday December 23, 2019 @09:46AM (#21863879)
Swift handles this exact problem quite elegantly with the "if case let" construct, allowing you to destructure sum types directly within an if statement.

https://alisoftware.github.io/swift/pattern-matching/2016/05...

There are no comments on this comment yet.