ELI5: Explain Like I'm 5

functional versus imperative programming

Functional and imperative programming are two ways of programming computers. Functional programming is like giving the computer a list of instructions to follow, while imperative programming is like giving the computer instructions to create a program that will do something.

In functional programming, you give the computer a list of instructions that tell it what to do in order to complete a task. You don't have to worry about how the computer will use those instructions to complete the task - the computer takes care of that.

In imperative programming, you give the computer instructions on how to create a program that can solve a problem. You have to specify exactly what the program should do and the computer will build a program from those instructions. The computer doesn't take care of the details - you do.

In summary, functional programming is like giving the computer a list of instructions to follow, while imperative programming is like giving the computer instructions to create a program.