Live data from Hacker News

Why does nobody seem to know what imperative and declarative mean?

leebriggs.co.uk

71–77 of 77 posts

Re: Why does nobody seem to know what imperative and declarative mean?

#71

edit: 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…

> unless you’re using an declarative language, which afaik Pulumi doesn’t support any

Pulumi has a YAML evaluator, with many of the same limitations of Terraform being imposed.

Re: Why does nobody seem to know what imperative and declarative mean?

#72

TLDR: everyone does know what imperative and declarative mean, but when it comes to Pulumi (an infrastructure-as-code development kit), nobody other than the author makes a distinction between Pulumi itself (declarative) and the code that uses Pulumi (imperative).

Is the YAML language runtime imperative?

It’s an important distinction to make because passionate CDK/Terraform/CloudFormation defenders use the dichotomy to dismiss different tools.

Re: Why does nobody seem to know what imperative and declarative mean?

#74

The author is making a pedantic point. While I agree with the main thesis that Pulumi *as a tool* is declarative, one of the main selling features (and the first thing I think of with Pulumi) is how languages like Python can be used to write it. Hence, the association of everyone besides the the author with Pulumi == imperative code. The imperative vs declarative argument has been used to keep Pulumi out of several i…

Not to a Node.js programmer!

Re: Why does nobody seem to know what imperative and declarative mean?

#75
post #40

In my experience, the critique of Pulumi and the CDK came down to not using the Cloud Formation service directly and adding needless abstractions over it. I didn't see much complaint about imperative vs declarative.

Isn't that what Terraform does, too?

Re: Why does nobody seem to know what imperative and declarative mean?

#76
post #72

TLDR: everyone does know what imperative and declarative mean, but when it comes to Pulumi (an infrastructure-as-code development kit), nobody other than the author makes a distinction between Pulumi itself (declarative) and the code that uses Pulumi (imperative).

Is the YAML language runtime imperative? It’s an important distinction to make because passionate CDK/Terraform/CloudFormation defenders use the dichotomy to dismiss different tools.

YAML is a serialization language so it depends on what you're serializing and how it's used

Re: Why does nobody seem to know what imperative and declarative mean?

#77
post #75
post #40

In my experience, the critique of Pulumi and the CDK came down to not using the Cloud Formation service directly and adding needless abstractions over it. I didn't see much complaint about imperative vs declarative.

Isn't that what Terraform does, too?

I think so, yes.
Post reply on HN