Declarative Programming Vs Imperative Programming

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 ca…


This content originally appeared on DEV Community and was authored by Philip John Basile

Image description

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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Declarative Programming Vs Imperative Programming." Philip John Basile | Sciencx - Wednesday April 26, 2023, https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/
HARVARD
Philip John Basile | Sciencx Wednesday April 26, 2023 » Declarative Programming Vs Imperative Programming., viewed ,<https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/>
VANCOUVER
Philip John Basile | Sciencx - » Declarative Programming Vs Imperative Programming. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/
CHICAGO
" » Declarative Programming Vs Imperative Programming." Philip John Basile | Sciencx - Accessed . https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/
IEEE
" » Declarative Programming Vs Imperative Programming." Philip John Basile | Sciencx [Online]. Available: https://www.scien.cx/2023/04/26/declarative-programming-vs-imperative-programming/. [Accessed: ]
rf:citation
» Declarative Programming Vs Imperative Programming | Philip John Basile | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.