3 ms·
I don't think everyone uses that definition of declarative, though it is one of them. A very common different definition is that declarative programs specify "w
by mjn 12y ago
I don't think everyone uses that definition of declarative, though it is one of them. A very common different definition is that declarative programs specify "what", not "how", i.e. desired outcomes are explicit, while algorithms for computing them are implicit. From that perspective, Prolog, SQL, constraint solvers, answer-set programming, etc. are declarative paradigms (albeit sometimes with non-declarative escape hatches, like Prolog's "cut"). But languages in which you write algorithms, whether C or SML, are something other than declarative, and instead are oriented towards explicitly specifying computations rather than the desired results of computations.