HTTP in Swift, Part 4: Loading Requests
Part 4 of Dave Delong's series on building a Swift HTTP framework looks at how to send requests and receive responses. It's another excellent entry in the series, and Dave succeeds in demonstrating how simplicity is the ultimate sophistication.
Posted on November 24, 2020
#network
#http
How an Hstack Lays out Its Children
As Chris Eidhof states in the introduction to this post, SwiftUI's layout system is, for the most part, intuitive to use. However, there are times when we encounter puzzling layout behaviors, and here Chris provides a detailed explanation of how one particular container view, an HStack, lays out its child views.
Posted on November 23, 2020
#swiftui
#layout
[Proposal] Static member lookup on protocol metatypes
Swift currently supports static member lookup on concrete types. This improves call-site legibility by enabling us to use leading dot syntax when accessing static values. In this Swift evolution pitch, Sam Lazarus proposes extending static member lookup to protocol metatypes. This would be a nice addition, and would not have any effect of source of API stability.
Posted on November 22, 2020
#evolution
#protocol
Parsing Tricky JSON With Codable in Swift
Parsing JSON is sometimes not as straightforward as we would like it to be, and we might find ourselves dealing with malformed JSON payloads. In this post, Andrés Ibañez shares his tips for parsing tricky JSON using Swift's Codable protocol.
Posted on November 18, 2020
#codable
#json
Unit Testing Asynchronous Code in Swift
Implementing unit tests for asynchronous logic presents challenges such as false-positive test results and untrustworthy or error-prone test executions. In this post, Vadim Bulavin describes four patterns that help us to deal with such challenges, enabling us to reliably test asynchronous code.
Posted on November 16, 2020
#testing
#asynchronous
Debugging SwiftUI: Trials and Tribulations
Working with relatively new frameworks such as SwiftUI means sometimes dealing with subpar debugging tools and seemingly unsolvable bugs. In this post, Reda Lemeden describes the frustration and anxiety he experienced when trying to resolve an issue without much help from the Swift compiler.
Posted on November 15, 2020
#swiftui
#debugging
HTTP in Swift, Part 3: Request Bodies
In part 3 in his series on building a Swift HTTP framework, Dave Delong takes a look at the body property of HTTP requests. Dave shows us how to implement a generalized body type in Swift, providing lots of code samples.
Posted on November 11, 2020
#network
#http
Swift Concurrency Roadmap
This post from the official Swift forums outlines the Swift Concurrency Roadmap. The goal of this roadmap is to make concurrent programming in Swift convenient, efficient, and safe. There is a lot to unpack in this post, but it's definitely worth reading, and there are some great language features planned for the first phase of the roadmap.
Posted on November 9, 2020
#concurrency
#evolution
Placeholder types
Building on a previous Swift evolution thread, Frederick Kellison-Linn pitches a proposal to add what he calls placeholder types to Swift. These placeholder types could be used when we want to explicitly provide some type information but also want the compiler to infer some type information.
Posted on November 4, 2020
#evolution
#compiler
Swift KeyPaths under a different optic
Bow is a library for typed functional programming in Swift. The optics module in Bow provides several utilities to work with immutable data structures. In this post, Tomás Ruiz López compares Swift KeyPaths to features available in the Bow optics module.
Posted on November 2, 2020
#keypath