Examples of declarative vs imperative instructions. In both cases you should get spaghetti in the end, but you won’t be able to micromanage the process when asking only for spaghetti (declarative, high-level).
Declarative Make spaghetti.
Imperative boil 5 litres of water, add 20g of salt, open packet and add 500g spaghetti, cook for 8 minutes or until the spaghetti is soft but has a bit of bite.
I wonder if it makes sense to write something about Deterministic vs non-deterministic computing here? Aren’t both imperative and declarative instructions deterministic, in that they both expect a given outcome? Where a non-deterministic instruction would be something more like ‘let’s make food?’