The Declarative/Imperative Language Rift
The recent round of debates around systemd have gotten me thinking again about the declarative/imperative language rift, and ways to bridge it.
Declarative languages start from a constrained set of use cases, compiling a constrained solution through a set of reasonably intelligent heuristics, to provide a reasonably efficient implementation. Contrast e.g., Python with SQL.
A well designed declarative language makes life much much easier for the 90% of use cases that fit within its pattern:
- It tends to be easier to write simpler code with more obvious intent.
- Language features and capabilities tend to be narrower and thus far more discoverable.
- It's easier for a compiler/runtime to discover specification problems early.