Understanding declarative programming
Declarative programming is a whole new programming paradigm that provides us with more readable and robust code. Declarative programming is not a new concept at all – in fact, we can find the roots of declarative programming 30–40 years ago. But only in the last decade has declarative programming gained popularity.
Let’s try to get into more detail about declarative programming by answering some questions we may encounter during an interview.
“What’s the difference between declarative programming and the “classic” programming paradigm, also known as imperative programming?”
Why is this question important?
If the workplace we interview for uses Combine or SwiftUI in its projects, we will probably have to answer some variant of this question. The reason is that the difference in how we approach code is so big that we cannot avoid restructuring our thoughts to answer that.
What...