Imperative vs. Declarative Programming
Programming can broadly be categorized into two paradigms: imperative and declarative.
Imperative programming expresses how problems should be solved through the specification of algorithms, which contain step-by-step instructions. State is updated by executing these instructions (e.g., fetch this data, then perform this operation, then another).
Declarative programming describes what a program should accomplish, rather than how to achieve it. A declarative program specifies the expected result and core logic, without needing to direct the program's control flow.
In the Context of Blockchain Architectures
Every general-purpose blockchain since Ethereum has used the imperative programming model, and it remains the prevailing paradigm for framing problems in the blockchain space. Because imperative blockchains rely on the linear execution of code to achieve state changes, the sole method for interacting with them is via imperative instructions (e.g., transactions and smart contracts).
Meanwhile, although declarative programming is well-understood in computer science, it has so far been underutilized in blockchain architecture. However, a wave of interest is emerging in declarative approaches, due to the many benefits this paradigm offers.