What is the difference between declarative and imperative paradigm in programming?

A great C# example of declarative vs. imperative programming is LINQ. With imperative programming, you tell the compiler what you want to happen, step by step. For example, let’s start with this collection, and choose the odd numbers: With imperative programming, we’d step through this, and decide what we want: Here, we’re saying: Create a … Read more