Michael Long
Nov 22, 2022

--

I'd characterize it as functional, not declarative. Though it also goes through a lot of work to mask that.

I mean, from a interface perspective. what's the difference between...

let t1 = t0.alter(.title("Get Coffee — ASAP"))

And

let t1 = t0.alter(title: "Get Coffee — ASAP")

Both pretty much provide the same result and experience, plus with the later I can easily a title-altering protocol should the need arise to prototype or mock the functionality.

protocol TitleAltering {

alter(title: String) -> Self

}

--

--

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.

No responses yet