Imagine you’re driving a car and you’re thirsty.
You ask your passenger: ‘Hey Max, take the bottle, open it, and put it in my right hand.’
That’s procedural programming.
But when you simply say: ‘I’m thirsty,’ you expect the passenger to know what to do and handle it in the best way to satisfy your need.
That’s declarative programming.
UIKit and SwiftUI are perfect examples of these two styles.



