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
}