3 ms·
You're conflating declarative and functional. It's declarative, yes. But it's not functional because there are no functions. No inputs, no outputs. It's not
by daxfohl 11y ago
You're conflating declarative and functional. It's declarative, yes. But it's not functional because there are no functions. No inputs, no outputs. It's not a programming language. It's just a config file.
- zurn 11y agoI think functional and declarative are widely regarded as closely related paradigms, certainly you might call a FP program a declarative program. After all a declaration of a value as being derived from some inputs is very similar in concept to an immutable binding in a function or the concepts from functional reactive programming. See eg https://en.wikipedia.org/wiki/Declarative_programming#Functional_programming https://en.wikipedia.org/wiki/Declarative_programming#Functi...
- daxfohl 11y agoYes, I'd absolutely agree that pure functions are declarative, so "functional" is a subset of "declarative". But it's a strict subset: config files are declarative without being functional. Raw data is declarative without being functional. One could argue that imperative functions are declarative too: "This C code is the declaration of what steps to execute in what order". So the definition of declarative can be a little fuzzy around the edges, but pure functions are most certainly declarative. Anyway, QML is most certainly declarative, however it's still not functional because there's no functions.
- deleted 11y ago[deleted]