This week’s question comes from
Hans:
Isn‘t Swift syntax getting too complicated just to reduce code size? E.g. So many ways to solve asynchronous execution.
It’s a common question asked, and it makes sense for developers to wonder: Swift keeps getting new features, keywords, and functionalities.
I’ve given several talks over the last year, covering Macros, Opaque types, existential any, and generics. All quite complicated topics, but they have one thing in common: you’re not required to use them.
I think it’s key to understand that Swift offers many ways to write complex solutions, but there are often alternative solutions that use the basic features of Swift. You might end up with more duplicate code, but that’s worth the tradeoff if you’re unfamiliar with the latest features.
I’m also sure many of the features are for specific cases. For example, Macros will likely be developed inside SDKs or distributed via open-source repositories. For a regular app project, there’s no need to write custom Macros.