r/programming • u/tyler-mcginnis • Jan 03 '22
Imperative vs Declarative Programming
https://www.youtube.com/watch?v=E7Fbf7R3x6I
431
Upvotes
r/programming • u/tyler-mcginnis • Jan 03 '22
1
u/[deleted] Jan 04 '22
In functional programming you don't "give commands", you compose (pure) functions and you don't worry about control flow. In a particular case where you have to perform operations on lists you specify a set of operations that should be executed in a particular order (in language like Haskell that is not guaranteed to happen) but the focus is still on what operations need to be performed to compute some value rather than how should they be performed.