DEV Community

Discussion on: Imperative vs Declarative Programming

Collapse
 
dfockler profile image
Dan Fockler

Places where declarative programming has been really useful, are places where we are not particularly interested in how the output gets created, as long as it's correct. Things like web programming, SQL, and spreadsheets are obvious areas where this already works well. I think the model for it makes sense in these situations because the engines that actually generate the running programs (browser, RDBMS, Excel) have a well defined output so you can build that engine in the first place and know the results are correct.

At some level you need imperative programming because computers operate on simple instructions. Declarative programming is just another abstraction over this which is closer to a spoken language because that's usually how humans think about things anyways.