Toby O'ConnellSwift enums and the danger of the default caseHow not to lay traps for future developersFeb 15Feb 15
Toby O'ConnellinCodeXWhy 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
Toby O'ConnellinCodeXThe importance of logical data modellingHow we can use enums instead structs to prevent crashes and simplify codeApr 12, 20221Apr 12, 20221
Toby O'ConnellinCodeXFun with Natural Language ProcessingHow you can use Apple’s Natural Language framework to spell check and more!Apr 10, 2022Apr 10, 2022
Toby O'ConnellinCodeXSwift + C: Callback InteroperabilitySolving the context capture issues in @convention(c) closuresOct 22, 20211Oct 22, 20211
Toby O'ConnellTuple 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
Toby O'ConnellinCodeXEnums 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
Toby O'ConnellinCodeXEncoding awkward types with minimal boilerplate using `withUnsafeBytes`HistoryMar 26, 2021Mar 26, 2021
Toby O'ConnellinCodeXUsing 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
Toby O'ConnellinCodeXUIGestureRecognizer 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