Published inCodeXWhy structs are better than protocols for dependency inversionHow we use structs instead of protocols to reduce verbosity and complexity whilst maintaining testabilitySep 19, 20227Sep 19, 20227
Published inCodeXThe importance of logical data modellingHow we can use enums instead structs to prevent crashes and simplify codeApr 12, 20221Apr 12, 20221
Published inCodeXFun with Natural Language ProcessingHow you can use Apple’s Natural Language framework to spell check and more!Apr 10, 2022Apr 10, 2022
Published inCodeXSwift + C: Callback InteroperabilitySolving the context capture issues in @convention(c) closuresOct 22, 20211Oct 22, 20211
Tuple splatting in SwiftHow Tuple Splatting can make higher order functions more concise, plus a bonus helper function to use on single elements!Aug 28, 2021Aug 28, 2021
Published inCodeXEnums Cases as Protocol Witnesses and the Open-Closed PrincipleHow can enum cases can be used to satisfy protocol requirements & deciding if they’re the best choice for API ergonomics.Jul 24, 2021Jul 24, 2021
Published inCodeXEncoding awkward types with minimal boilerplate using `withUnsafeBytes`HistoryMar 26, 2021Mar 26, 2021
Published inCodeXUsing tuples for Comparable and Equatable conformanceRecently I discovered that tuples can be used to easily and simply compare and equate multiple variables.Mar 20, 2021Mar 20, 2021
Published inCodeXUIGestureRecognizer with closuresOne of the biggest downsides to UIGestureRecognizer is the inability to attach simple closures in-line. To use them, a target object must…Mar 7, 2021Mar 7, 2021