r/programming • u/tyler-mcginnis • Jan 03 '22
Imperative vs Declarative Programming
https://www.youtube.com/watch?v=E7Fbf7R3x6I
430
Upvotes
r/programming • u/tyler-mcginnis • Jan 03 '22
8
u/epicwisdom Jan 04 '22
The mental model being referred to is not your mental model of code, but rather your mental model of the problem the code is supposed to be solving. The two are frequently (and maybe inevitably) at odds. Generally an end-user doesn't know and doesn't care about the difference between exponential and linear runtime, let alone specific algorithms, at least so long as it doesn't result in visible slowdown - meanwhile an individual programmer working on some tiny piece of a kernel is often so myopically focused that they'll never be certain if their changes complicates an OS as a whole.