2 ms·
I think they mean declarative in the sense that you write down want you _want_ in a solution (prolog/datalog/terraform/etc) without specifying exactly how to co
by bubblyworld 2y ago
I think they mean declarative in the sense that you write down want you _want_ in a solution (prolog/datalog/terraform/etc) without specifying exactly how to compute it (day to day programming languages).
- zarathustreal 2y agoThe definition of computation depends on the abstraction level. Languages span multiple abstraction levels. The point is that there’s no meaningful definition of “declarative language” as proven by the examples I’ve already given. For example you can “compute” a roguelike in TypeScript types, but a type system is declarative!
- emporas 2y agoIf you are willing to go to extraordinary lengths, then yes any programming language can be written in a declarative style, at least some part of the program. Some parts of a Java or PHP program can be written declaratively. In the Nix language context however, they mean declarative and functional like Prolog. There is also Guix which uses Scheme to declare dependencies, and Scheme is not a declarative language. Scheme is a functional language, but it can be easily written in a declarative style.
- bubblyworld 2y agoEveryone knows this, friend. It's still a useful distinction.