This content originally appeared on DEV Community and was authored by Philip John Basile
Imperative: My cat is hungry. I'll goto the pantry and grab a can. I'll unfurl the top and walk to the garbage can. At the garbage can I will open the lid with my foot and place said unfurled top with ease into said can. Cat looks at me. I look at cat. I goto the pantry again. I grab a disposable dish from the shelf. I flip the cat can into the dish. I hold the new almost empty cat can and place the disposable dish on the floor with the other hand. I walk to the trash can. I open it up with my foot. I chuck the can. I call the cat. The cat runs in. My cat is now eating.
Declarative: I'll feed my cat.
This content originally appeared on DEV Community and was authored by Philip John Basile
![](https://www.radiofree.org/wp-content/plugins/print-app/icon.jpg)
Philip John Basile | Sciencx (2023-04-26T15:04:50+00:00) Declarative Programming Vs Imperative Programming. Retrieved from https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.