From: ···@netvision.net.il
Subject: Re: a comparison of langs.
Date: 
Message-ID: <33420859.FDA@netvision.net.il>
Hello Andrew and thanks for answering.
I am an experienced OOP programmer but new to symbolic programming. 
Nevertheless I have to embark on a very large programming task in zero 
time (within days) and finish it in as little as 4 month (working 16
hours a day, sounds familiar ? :-) ).
I am trying to quickly determine which of the two environments (lisp,
prolog) is better suited for my needs.
So what I actually want to know are practical (not religious) reasons
for why people choose Lisp over Prolog or vice versa for specific 
real world applications.

Best Regards
	Gary

Andrew Dadakow wrote:
> 
> Gary,
> I thing that's a vague question. Aren't the domains mentioned the same?
> 
> Andrew Answer ( 1 apr 97 )

From: ············@cl.cam.ac.uk
Subject: Re: a comparison of langs.
Date: 
Message-ID: <5ht9kr$t0f@lyra.csx.cam.ac.uk>
Tricky question!

Lisp is probably easier to get to grips with coming from an imperative
background, but is weaker on the symbol manipulation front.  There are
also some wonderful development tools around for Lisp.  The drawback
is that Common Lisp has everything including the kitchen sink (Guy
Steele's CL *reference book* is over 1000 pages long!) and learning to
use all these wonderful facilities productively would take much longer
than your four months.

A good alternative is Scheme or (even better) ML, if you want a
functional language.  Both of these languages are small, concise, well
supported, efficient and (relative to Lisp at least) free of
oddnesses.

Prolog is *awesome* at symbol manipulation and it's flow of control is
depth first, so it is ideally suited to searching problems.  However,
if you haven't had any experience with logic programming, Prolog can
be very confusing to the novice (even though it's a beautifully simple
little language).  Apart from being untyped, it's also a real pain
when a predicate that is supposed to be deterministic ends up
backtracking all over the place - makes debugging a real pain at
times.

For my money, Mercury is a much better option.  It looks pretty
similar to Prolog, but type and mode declarations are mandatory.
The compiler spots many many bugs for you and generates code of
unprecedented quality in the LP community.

2p.

Ralph
--
············@cl.cam.ac.uk                    http://www.cl.cam.ac.uk/users/rwab1
From: Tyson Richard DOWD
Subject: Re: a comparison of langs.
Date: 
Message-ID: <5hv18c$hl3@mulga.cs.mu.OZ.AU>
············@cl.cam.ac.uk writes:

>[other things]

>For my money, Mercury is a much better option.  It looks pretty
>similar to Prolog, but type and mode declarations are mandatory.
>The compiler spots many many bugs for you and generates code of
>unprecedented quality in the LP community.

Actually, as of the last release (0.6) the Mercury compiler supports
local type and mode inference of predicates (with some limitations).  It
is still mandatory to declare types and modes for exported predicates,
and to write the declarations for the types you wish to use.

From the release notes:

	* We now provide preliminary support for type and mode inference.
	  
	  The `:- pred' and `:- mode' declarations are now optional for
	  predicates that are local to a module; the compiler will
	  infer the types and modes automatically.

	  This support is not yet complete, and so type and mode
	  inference are not enabled by default. They can be enabled
	  using the `--infer-types' and `--infer-modes' options. The 
	  limitations of the current implementation are: (1) type inference 
	  loops for certain very rare type-incorrect programs; (2) mode
	  inference doesn't support reordering; (3) there are some
	  modes which the current mode inference algorithm is not
	  capable of inferring.  Note that omitting type and mode
	  declarations can significantly reduce the quality of the
	  compiler's error messages; if you have trouble understanding
	  an error message, then it is a good idea to add explicit type
	  and mode declarations.  

I personally don't use the inference, as I find writing type and mode
declarations clarifies my thinking about design, and the declarations
are good documentation for later modifications.

For more information on Mercury, try the Mercury homepage:
	http://www.cs.mu.oz.au/mercury
From: Tyson Richard DOWD
Subject: Re: a comparison of langs.
Date: 
Message-ID: <5hv1be$hmc@mulga.cs.mu.OZ.AU>
············@cl.cam.ac.uk writes:

>[other things]

>For my money, Mercury is a much better option.  It looks pretty
>similar to Prolog, but type and mode declarations are mandatory.
>The compiler spots many many bugs for you and generates code of
>unprecedented quality in the LP community.

Actually, as of the last release (0.6) the Mercury compiler supports
local type and mode inference of predicates (with some limitations).  It
is still mandatory to declare types and modes for exported predicates,
and to write the declarations for the types you wish to use.

From the release notes:

	* We now provide preliminary support for type and mode inference.
	  
	  The `:- pred' and `:- mode' declarations are now optional for
	  predicates that are local to a module; the compiler will
	  infer the types and modes automatically.

	  This support is not yet complete, and so type and mode
	  inference are not enabled by default. They can be enabled
	  using the `--infer-types' and `--infer-modes' options. The 
	  limitations of the current implementation are: (1) type inference 
	  loops for certain very rare type-incorrect programs; (2) mode
	  inference doesn't support reordering; (3) there are some
	  modes which the current mode inference algorithm is not
	  capable of inferring.  Note that omitting type and mode
	  declarations can significantly reduce the quality of the
	  compiler's error messages; if you have trouble understanding
	  an error message, then it is a good idea to add explicit type
	  and mode declarations.  

I personally don't use the inference, as I find writing type and mode
declarations clarifies my thinking about design, and the declarations
are good documentation for later modifications.

For more information on Mercury, try the Mercury homepage:
	http://www.cs.mu.oz.au/mercury
From: Karen A. Morrissey
Subject: Re: a comparison of langs.
Date: 
Message-ID: <3343C2F5.3413@uswest.com>
···@netvision.net.il wrote:
> 
> Hello Andrew and thanks for answering.
> I am an experienced OOP programmer but new to symbolic programming.
> Nevertheless I have to embark on a very large programming task in zero
> time (within days) and finish it in as little as 4 month (working 16
> hours a day, sounds familiar ? :-) ).
> I am trying to quickly determine which of the two environments (lisp,
> prolog) is better suited for my needs.
> [...]

With such limited time, I don't think I'd recommend using any language
with which you are unfamiliar.

-- 
Karen A. Morrissey      ··············@uswest.com (USW business)
US West Communications  ·················@aol.com (other bus. &
personal)
1801 California         (on assignment from Analysts International)
Suite 310
Denver, CO 80202        42 = the 8-bit checksum of the universe.
303-965-8473