home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.ai
- Path: sparky!uunet!infonode!ingr!capalo!quintus!quintus!ludemann
- From: ludemann@quintus.com (Peter Ludemann)
- Subject: Re: turbo prolog
- Message-ID: <1992Sep2.192925.3682@quintus.com>
- Sender: news@quintus.com (USENET news account)
- Nntp-Posting-Host: ebisu
- Organization: Quintus Corporation, Palo Alto, CA
- References: <24026.2A94A6D0@psycho.fidonet.org> <7264@skye.ed.ac.uk> <1992Aug25.111331@aifh.ed.ac.uk>
- Date: Wed, 2 Sep 1992 19:29:25 GMT
- Lines: 42
-
- In article <1992Aug25.111331@aifh.ed.ac.uk>, xindongw@aifh.ed.ac.uk (Xindong Wu) writes:
- > > Turbo_Prolog may be an interesting language, but it is *not* Prolog.
- >
- > I don't think so. The only difference between Turbo and other Prolog
- > languages (e.g. SICStus) is that Turbo needs a declaration part before
- > clauses. However, the declaration makes Turbo quite easier to compile
- > programs into runtime systems while I have been bored with the facilities
- > in other Prolog languages for this work.
- >
-
- Disagree.
-
- Turbo Prolog's types are similar to Pascal's. This makes writing generic
- predicates difficult. For example, in Turbo Prolog, how would you write a sort
- predicate which takes as arguments:
- (input) a 2-arity ordering predicate
- (input) a list of TypeX
- (output) a list of TypeX, sorted using the ordering predicate
- which can be called by:
- sort( =< , [3,1,2] , SortedList) /* sort ascending */
- sort( >= , [3,1,2] , SortedList) /* sort descending */
- sort( before, [task1,task2,task3,task4], SortedList) /* topological sort of tasks */
-
- This is just one example of how Turbo Prolog is missing some important
- functionality that is in "regular" Prolog.
-
- Which is not to say that Turbo Prolog is bad; it just isn't sufficient
- for many of the things I do using Prolog.
-
- If you search the literature, you'll find many type schemes for logic
- and functional languages, each with its own advantages and disadvantages.
- Producing very efficient code is the goal of most Prolog implementors; if
- adopting Turbo Prolog's type scheme were sufficient, I'm sure that
- all other Prolog implementations would provide something similar.
- Unfortunately, Turbo Prolog's type scheme is inadequate for many complex symbol
- manipulation tasks; and if all you know of Prolog is what Turbo Prolog provides,
- you're missing a lot. (By the way, right now I'm using Prolog for analyzing
- 1,000 line-drawing maps and converting them into a geographic database; my
- Prolog code runs faster than the database loader, which was written in C.)
-
- --
- Peter Ludemann +1-415-813-3800 ludemann@quintus.com
-