How to use
ArgumentParser
withasync
/await
in SwiftIf you’ve adopted structured concurrency in your applications since it landed in Swift 5.5, you may have found that the
Read moreArgumentParser
module does not yet work with anasync
main
function out-of-the-box.Why does
async let
turnrethrows
intothrows
in Swift?If you’ve used structured concurrency in Swift enough, you may have noticed that the
Read morerethrows
keyword doesn’t always “work” withasync
/await
, at least according to our intuitions about whentry
should and shouldn’t be required.Low-level Swift optimization tips
This article documents several techniques I have found effective at improving the run time performance of Swift applications without resorting to “writing C in
Read more.swift
files”. (That is, without resorting to C-like idioms and design patterns.) It also highlights a few pitfalls that often afflict Swift programmers trying to optimize Swift code.