- iPhone (2)
- Learning (42)
- Linux (4)
- Debian (1)
- Mac Terminal / Linux (5)
- Other Stuff (1)
- Programming (66)
- Slim Framework (1)
- Uncategorized (4)
- WordPress (5)
We participate in the Amazon Service LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
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.