I wrote an article for this month's on how to use value types to improve your code's flexibility + clarity.
objc.io/issue-16/swift
Conversation
FWIW function values are also reference types (observable via captures).
1
Replying to
Word, thank you. I'll see if I can slip in a note about how putting closures in a value type can create dependencies.
Replying to
Dunno how special it is. It's the same as putting class references in a value, really.
1
Absolutely: I just think it's worth a specific callout because it's slightly less intuitive how this could create harm.

