- iPhone (2)
- Learning (42)
- Linux (4)
- Debian (1)
- Mac Terminal / Linux (5)
- Other Stuff (1)
- Programming (66)
- Slim Framework (1)
- WordPress (5)
Imperative Programming focuses on how a program operates. Declarative programing focuses on what the program should accomplish without specifying how it will accomplish it.
In a way, the Abstraction of Object Oriented Programming can be viewed as a more Declarative way of writing code.
How? By hiding the details, a class allows you to “ask” it to do something, without you having to know how it will accomplish the requested task.
For example, if I ask a widget factory class to hand me a widget, I expect to get a widget, but I don’t need to worry about how that widget was created. The implementation details have been abstracted away for me.
I know it’s not really the same thing, but the definition of Declarative programming reminds me of the abstraction that OOP offers.