[TYPES] Declarative vs imperative

Uday S Reddy u.s.reddy at cs.bham.ac.uk
Mon Apr 22 14:15:36 EDT 2013

Vladimir Lifschitz writes:

> The way I see it, the difference between declarative and imperative
> programs is as clear-cut as the difference between declarative and
> imperative sentences in natural languages: "I like it" vs. "Sit down".
> A declarative sentence can be true or false; an imperative sentence
> can be executed or not executed.

Indeed, "Sit down" is an imperative sentence.  "To sit down" is a noun.  "It
is nice to sit down" is a declarative sentence.  In an imperative
programming language, you will find all three.  So, to me, nothing is
clear-cut about the distinctions that people make!

> A declarative program may look similar to a procedural program if they
> use similar data structures.  Still, the difference is clear: a (truly)
> declarative program describes what is counted as a solution; a procedural
> program tells us which operations to perform.

Indeed, high-level programming languages that can automate a lot of the
programming work are always brilliant.  However, I don't see what this has
to do with the declarative-procedural spectrum.  There are high-level design
tools using UML notations that also achieve a high degree of automation in
program generation, and a good proportion of those notations are imperative.
As I mentioned previously, the highest level programming systems that we
might imagine for applications like stock-market trading systems or on-board
flight control systems might indeed be imperative.

So, this is a false dichotomy, as far as I am concerned.


More information about the Types-list mailing list