3 ms·
This thread has such terrible answers, I feel compelled to give a better one: Imperative programming is complex because, at the end of the day, everything we d
by dtagames 5y ago
This thread has such terrible answers, I feel compelled to give a better one:
Imperative programming is complex because, at the end of the day, everything we do with computers is imperative. In other words, it's just a long string of instructions executed one after the other. When you're looking at the level of processors and storage, all computer operations must be reduced to tiny, imperative steps.
This is the source of the complexity because any human task "waves away" lots of small details thanks to our own brain and muscle memory. Take the simple problem of getting a book off the shelf. Any human can do it, even young children. But it involves thousands of individual steps related to locating the shelf, locating the book, and coordinating hand and eye movements in order to grab it. All the location data and movement data must be stored somewhere in the computer and acted upon imperatively. With ourselves, we don't have to do that. We can jump from the concept of "grab the book" to all the intermediary steps and the order they go in. We don't have to think about accessing "memory locations" or physical "devices" in our bodies to get things done.
Computer programming will always be complex because of this difference between men and machines. Sometimes we experience the same problems as computers -- when we have to stop and think about the smaller steps needed for a larger goal, or when we have to consciously write down and remember information in order to recall it properly later. In this way, we are "imperatively programming" ourselves to complete a task.