Lambda the Ultimate

inactiveTopic Declarative or Inferential?
started 8/21/2000; 11:14:29 PM - last post 8/22/2000; 11:11:53 PM
andrew cooke - Declarative or Inferential?  blueArrow
8/21/2000; 11:14:29 PM (reads: 693, responses: 3)
Declarative or Inferential?
At first glance this looks like a silly argument about terminology, but there's a lot of interesting, well-argued points (The broadest [meaning of the word "declarative"] basically just means `high level'...) - it also works as an introduction to declarative (or inferential?) languages.

(It's a recent Logic Programming Newsletter, but their archive only contains issues from before mid 1996.)
Posted to "" by andrew cooke on 8/21/00; 11:16:58 PM

Chris Rathman - Re: Declarative or Inferential?  blueArrow
8/22/2000; 6:34:18 AM (reads: 737, responses: 2)
Programming language taxonomy is not necessarily a clean science, as the divisions are really blurred. I have no problem with using the term Declarative for Prolog and the logic languages. Nor do I have a problem with using Functional for the FP type languages. This in spite of the fact that all computer languages pretty well have declarative and functional aspects. It's really more a matter of the emphasis of the language.

Although, Prolog has been highly influential in a number of the functional languages (Haskell, ML, Erlang, etc...), I don't think that Prolog can be considered a functional programming language. But aside from Prolog and perhaps Mozart, I'm not sure what other languages could be classified as Declarative?

andrew cooke - Re: Declarative or Inferential?  blueArrow
8/22/2000; 1:33:18 PM (reads: 775, responses: 1)
aside from Prolog and perhaps Mozart, I'm not sure what other languages could be classified as Declarative

Sometimes Lisp code can be declarative - there seems to be a style of writing Lisp code that ends up with code that seems to state the problem more than a particular solution (I think some examples in Norvig's "AI Programming" are like this), but since you can also use Lisp in so many other styles it's hard to argue that the language fits a "declarative" label (under what you might call the "inferential" classification scheme - for others Lisp is declarative by definition :-)

Oz, on the other hand, drops the Prolog syntax - you effectively manage searches through libraries (at least, that was my impression reading the docs). It still has "logic variables" (assign once, block on reading undefined value), which are important in supporting both declarative-like coding and multiple threads.

From the declarative appearance of ML code when pattern matching is used, and what I said above about Lisp, I'm thinking that declarative implies a certain syntactic sugar, which is perhaps why it is confusing as a language label... Inferential gets my vote :-)

Skib - Re: Declarative or Inferential?  blueArrow
8/22/2000; 11:11:53 PM (reads: 837, responses: 0)
What about something like CLIPS and other expert shells (JESS)? These have objects and functions with side-effects and so classically non-declarative. But are definitely rule based therefore must be declarative.

The semantics lie somewhere like, if a language actively supports a declarative style and you use it in that form then it is declarative, despite other features. I am not sure what "inferential" brings to the table but I kinda like the idea that the language is inferential, and then you program stylistically in a declarative, functional, etc. manner.

So the core debate is between imperative versus inferential. Haskell's monads, of course, making it imperative -- back to square one...