Re: Declarative constraints in practical terms

From: dawn <dawnwolthuis_at_gmail.com>
Date: 27 Feb 2006 15:59:46 -0800
Message-ID: <1141084786.447746.273410_at_u72g2000cwu.googlegroups.com>


Mikito Harakiri wrote:
> ralphbecket_at_gmail.com wrote:
> > Rougly speaking, a declarative logic language should
> > - not have side effects;
> > - be order independent (i.e., respect the commutativity
> > of conjunction and disjunction and be sound w.r.t.
> > negation, if supported); and

I'm not sure I fully understand this -- can you provide an example of how an imperative language would not meet this requirement?

> > - functions (if any) should be referentially transparent.

So you cannot write functions that take keyboard input, right? How would a declarative language take user input?

> > Have a look at Mercury for an example of a pragmatic,
> > general purpose, high performance declarative
> > programming language.
>
> In a truly declarative language predicates shouldn't have the "mode"
> declarations

Now I'm trying to sort out the difference between declarative and imperative as well as the reason I would want to use one over the other.

All declarative languages have these features that are not found in imperative languages:

Would the list completing this sentence be Ralph's list above?

--dawn Received on Tue Feb 28 2006 - 00:59:46 CET

Original text of this message