Parsing with Mutating Methods
We show a parsing technique that we use for many parsing tasks in our day-to-day work.
Episode 170 · Sep 20 2019
Swift is a complex language. While much of the more advanced features and oddities stay out of sight in everyday iOS development, studying these aspects provides many learning opportunities. This collection covers some of the lesser known aspects of the Swift languague.
21 Episodes · 7h09min
We show a parsing technique that we use for many parsing tasks in our day-to-day work.
Episode 170 · Sep 20 2019
We refactor our string interpolation code to allow concatenation of multiple interpolated SQL queries.
Episode 144 · Mar 22 2019
We use Swift 5's new string interpolation API to automatically insert placeholders in SQL queries.
Episode 143 · Mar 15 2019
We add support for arrays by implementing an unkeyed decoding container and use custom decoding logic for dates and URLs.
Episode 116 · Aug 31 2018
We implement a custom XML decoder that allows us to decode responses from an XML API using Decodable.
Episode 115 · Aug 24 2018
We're using Swift's Mirror and Decodable APIs to generate database queries for structs in our Swift Talk backend project.
Episode 114 · Aug 17 2018
We discuss many considerations and techniques for working with optionals.
Episode 93 · Mar 23 2018
We use Swift's pointer APIs to read a text file and split it into lines without using Swift's collection and string types.
Episode 92 · Mar 16 2018
We implement a concurrent version of the map method for arrays.
Episode 90 · Mar 02 2018
We look at how to work with ranges in a mixed Swift String/NSString environment.
Episode 80 · Dec 15 2017
We benchmark the CSV parsing code from the previous episode and refactor it to become an order of magnitude faster.
Episode 79 · Dec 08 2017
We write a simple CSV parser as an example demonstrating how to work with Swift's String and Substring types.
Episode 78 · Dec 01 2017
We clean up our layout code by introducing helper functions that leverage Swift's key paths.
Episode 75 · Nov 10 2017
Brandon Kase joins us to show how Swift's type system can be leveraged to check file paths at compile time.
Episode 71 · Oct 13 2017
Swift 4's new features lets us delete code we've written in previous episodes.
Episode 52 · Jun 02 2017
We look at multiple ways to create variables that have a class type but also conform to a protocol.
Episode 46 · Apr 21 2017
Mutating a nested untyped dictionary can be a challenge. To solve it we discuss the mutability of value types and the concept of l-values.
Episode 31 · Jan 06 2017
We refactor a class hierarchy using a protocol and discuss the differences between both approaches.
Episode 29 · Dec 16 2016
We talk about a familiar but surprisingly tricky problem: splitting an array into groups of elements. We discuss the pros and cons of our own solutions along with the solutions people sent us via Twitter!
Episode 23 · Nov 04 2016
We can change structs by mutation, functional chaining, and inout parameters. We discuss how they differ at the call site and why they’re all equivalent.
Episode 21 · Oct 21 2016
We use copy-on-write to write an efficient struct wrapper around NSMutableData and discuss how the standard library uses the same approach.
Episode 20 · Oct 14 2016