Imperative is implementation driven. Declarative is implementation free. Declarative functions can be chained and are more readable.

imperative versus declarative

https://codeburst.io/imperative-vs-declarative-javascript-8b5e45a602dd

In general also we will start moving towards declarative paradigm as that is a level of abstraction and frees the user from the implementation details.

Examples of Declarative Systems

  1. Kubernetes. Kubernetes is a declarative system. It basically says what we want(softwares) and what state we want them in(min, max and average)
  2. grpc code generation in multiple languages
  3. terraform
  4. AI and agents

Referenced in:

All notes