Article View: comp.lang.prolog
Article #3753Re: The meaning of "declarative"
From: Barry W. Kort
Date: Sun, 06 Nov 1988 17:57
Date: Sun, 06 Nov 1988 17:57
35 lines
2300 bytes
2300 bytes
In article <602@quintus.UUCP > ok@quintus.UUCP (Richard A. O'Keefe) writes: > The nice thing about declarative programming is that > you can write a specification and run it as a program. > > The nasty thing about declarative programming is that > some clear specifications make incredibly bad programs. > > The hope of declarative programming is that > you can move from a specification to a reasonable program > without leaving the language. > > * * * > > One of the biggest things to grasp about declarative programming > (and this means pure Lisp, ML, Miranda, Prolog, NAIL!, you name it) > is the importance of keeping it clean and obvious so that you can > play with it at a high level, looking for transformations of the > problem (leading to transformations of the program). The big gains > are almost always to be found at the upper levels (eliminating some > operation entirely by transforming the problem space, for example) > rather than by hacking at the low levels (coding the operation a > few microseconds faster). A tip of the hat to Richard for his well-penned remarks. I am amazed at the power of Prolog to solve a problem in combinatorial logic without being given an explicit method. But I am also disheartened by the difficulty of untangling the effects of reordering the clauses. When a bright student solves a brain-teaser, the order in which the clues are stated does not strongly affect the method of solution. In Prolog, resequencing the clues can have dramatic effects on the search order. I find this phenomenon bewildering. --Barry Kort
Technical Details
Message-ID:
<41581@linus.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!husc6!linus!mbunix!bwkReferences:
<ALF.88Oct2184429@hathor.sics.se > <818@etive.ed.ac.uk> <590@dcl-csvax.comp.lancs.ac.uk> <859@etive.ed.ac.uk> <256@aipna.ed.ac.uk> <41315@linus.UUCP> <602@quintus.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!husc6!linus!mbunix!bwk From: bwk@mitre-bedford.ARPA (Barry W. Kort) Newsgroups: comp.lang.prolog Subject: Re: The meaning of "declarative" Summary: High-level transformations give Prolog its power. Message-ID: <41581@linus.UUCP> Date: 6 Nov 88 17:57:50 GMT References: <ALF.88Oct2184429@hathor.sics.se > <818@etive.ed.ac.uk> <590@dcl-csvax.comp.lancs.ac.uk> <859@etive.ed.ac.uk> <256@aipna.ed.ac.uk> <41315@linus.UUCP> <602@quintus.UUCP> Sender: news@linus.UUCP Reply-To: bwk@mbunix (Kort) Organization: The MITRE Corporation, Bedford, Mass. Lines: 35