Imperative is implementation driven. Declarative is implementation free. Declarative functions can be chained and are more readable.
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.
declarative is what, imperative how.
Examples of Declarative Systems
- Kubernetes. Kubernetes is a declarative system. It basically says what we want(softwares) and what state we want them in(min, max and average)
- grpc code generation in multiple languages
- terraform
- AI and agents
Referenced in:
All notes