i'm looking at a book right now that says imperative prog style says *how* to do something; declarative says *what* to do
-
-
"What, if anything, is a declarative language?" https://existentialtype.wordpress.com/2013/07/18/what-if-anything-is-a-declarative-language/ …
-
I'M NOT ALONE <3 <3 <3
End of conversation
New conversation -
-
-
I think it is a bit more than an abstraction, because being declarative allows the computer to choose the how based on other factors.
-
well but someone had to write the bits of how that the computer chooses from at some point
End of conversation
New conversation -
-
-
Yes, it is. Examples of declarative code: sort(x) findMaxOf(x) For examples of imperative code, try implementing the above functions.
-
Ok so why isn't this just called encapsulation or abstraction
- 3 more replies
New conversation -
-
-
All languages are high enough in the stack that they're abstractions over how, so the question is just the interface you provide
-
C is "tell the PDP11 how to do something and I shall translate. Badly"
- 4 more replies
New conversation -
-
-
I prefer to think of it as removing control flow from programming. Focus on data and interactions. Spreadsheets are most common example.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
This Tweet is unavailable.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.