Amazing rant but I really wish they gave you a quick tldr on what the fuck the difference is between imperitive and declarative.
Why does nobody seem to know what imperative and declarative mean?
31–40 of 77 posts
Re: Why does nobody seem to know what imperative and declarative mean?
#32Earlier quoted context omitted.
As an example, declarative would be something like squares = map(square, inputs) While imperative would be a for loop, store this here, multiply that with this, push that onto the end of my results array, etc
Function calls don't make something declarative, otherwise C is declarative. And once you accept that, then words have no meaning anymore and we can't meaningfully discuss the topic.
Re: Why does nobody seem to know what imperative and declarative mean?
#33Re: Why does nobody seem to know what imperative and declarative mean?
#34So what I get from this is that Pulumi is declarative, but authoring Pulumi is imperative (unless you’re using an declarative language, which afaik Pulumi doesn’t support any).
I’m a pretty pedantic person, so I’d probably make this same argument once I had the knowledge. I don’t see what it changes for a developer though. If I’m writing imperative code then the tool running my IaC might as well be imperative. I guess it’s a cool piece of trivia to know though.
Re: Why does nobody seem to know what imperative and declarative mean?
#35Amazing rant but I really wish they gave you a quick tldr on what the fuck the difference is between imperitive and declarative.
It's much like the difference between "how" and "what". SQL select statements are my favored example of declarative: you simply "declare" what you want ("all rows from this table with these values in those columns") and it's up to an engine to actually figure out how to do that for you. In an imperative language like C you could produce the same output, but you'd be specifying how, not just what: a for loop to iterat…
There’s a sort of useless sense in which everything is declarative if you are allowed to shift around what the relevant “thing to be done” is, and it seems like many people are complaining that the article does this exact thing.
Re: Why does nobody seem to know what imperative and declarative mean?
#36Re: Why does nobody seem to know what imperative and declarative mean?
#37Taking a moment to plug https://dhall-lang.org/ , a truly non-imperative solution in this space
Re: Why does nobody seem to know what imperative and declarative mean?
#38edit: fixed a mistake where I put imperative instead of declarative So what I get from this is that Pulumi is declarative, but authoring Pulumi is imperative (unless you’re using an declarative language, which afaik Pulumi doesn’t support any). I’m a pretty pedantic person, so I’d probably make this same argument once I had the knowledge. I don’t see what it changes for a developer though. If I’m writing imperative c…
Re: Why does nobody seem to know what imperative and declarative mean?
#39Learn the difference between imperative and declarative! Knowing the difference between imperative and declarative is very important.
Re: Why does nobody seem to know what imperative and declarative mean?
#40I didn't see much complaint about imperative vs declarative.