Michael Long
Aug 19, 2021

--

There’s a third-party tool called SwiftGen you can use to generate certain types of boilerplate code, but as I’ve mentioned several times… then what?

We now have a generated function that mutates a value and forces a copy… which would already happen for you if you mutated a variable with Swift’s copy-on-write semantics. The generated function brought nothing to the table.

While boilerplate code is in fact a concern of the article, so was code size and compilation time, as all of the auto-generated code still has to be compiled and linked.

At any rate, thanks for taking a look.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)