Re: Bob's 'Self-aggrandizing ignorant' Count: Was: What databases have taught me

From: Marshall <marshall.spight_at_gmail.com>
Date: 4 Jul 2006 08:18:32 -0700
Message-ID: <1152026311.544608.137920_at_b68g2000cwa.googlegroups.com>


Bruno Desthuilliers wrote:
> Bob Badour wrote:
> (snip)
> > I think you are confusing two distinct dichotomies:
> >
> > Imperative vs functional
> > Declarative vs procedural
> >
> > I am not sure where the declarative vs imperative misconception
> > originated, but sadly, I see it has caught on.
> >
>
> Bob, I've *always* seen the dichotomie as being imperative (how) vs
> declarative (what) - procedural, functional and OO being mostly
> "programming style" (ways to express/organize). In this context,
> procedural is of course mainly imperative, functional is mainly
> declarative, and OO can be both (usually imperative in the
> implementation and declarative in the interface).
>
> You declare this a "misconception", yet it seems to be the commonly
> accepted definitions, so would you care giving some pointers ?

Consider what the terms mean.

Imperative means that the program has variables, and that the program over time will destructively update those variables.

Functional (in the strict sense) means the program does not have global state, and hence does not update any variables.

Procedural means the program proceeds by following step by step instructions that must be executed in order.

Declarative means the program consists of a declaration of the desired outcome, without specifying a procedure to follow.

Now, given those definitions, which terms are opposites?

Marshall Received on Tue Jul 04 2006 - 17:18:32 CEST

Original text of this message