Newsgroups: comp.ai
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.duke.edu!godot.cc.duq.edu!newsfeed.pitt.edu!uunet!sangam!shakti!news
From: sasi@saathi.ncst.ernet.in (Sasikumar M)
Subject: Languages for AI !
Message-ID: <CvFq4M.HEI@shakti.ncst.ernet.in>
Sender: news@shakti.ncst.ernet.in (News account)
Organization: National Centre for Software Technology, Bombay, India.
Date: Thu, 1 Sep 1994 05:05:09 GMT
Lines: 88

------------------------------

Hi,

I have been watching the on-going debate about C++ vs Lisp vs Prolog vs
etc for sometime. This is not the first time (and certainly not the last!)
when the same debate have appeared on the net. To a lot of people computer
languages are like religion; they will do anything to claim (or prove)
that their religion is the best (of course, for every conceivable
application).

As much of the wisdom on the net have emphasised again and again,
the point is there are a lot of differences among the languages being
discussed. If Lisp is good in one way, C++ is good in another,
Prolog in yet another way. So your application has to dictate the
suitability in most of these cases. For instance, if I required
a program which has to be as efficient as possible and is
largely numeric or uses very well-defined and well-understood 
algorithms, then my choice would probably be C,C++ etc. In
particular today good Lisp and Prolog implementations are
terribly expensive for commercial applications. So again, if
distribution is essential or if the end-user can not invest
money to buy Lisp/Prolog, I am forced to consider these
languages. But then that is nothing to do with the languages
per se. It is something for the Lisp/Prolog vendors to take
note of and worry about!!

On the other hand, if my application is very complex and I
am not very worried about run-time optimisation, I would
certainly like to consider Lisp/Prolog. There are a lot of things
that I like about them (in particular about Prolog). To be
fair, there are a few things that I dislike too. We have
three fairly big applications (resource scheduling applications)
all in Lisp/Prolog. These are largely classic AI programs.
And hence better in these languages. What is even more important
in these applications is that, the initial requirements
document in general captures only about 40-50% of the actual
requirements. Everyone will vouch at the time of preparing
the document that there is nothing more (the typical expert system
phenomenon). Once you have a prototype
ready, they will suddenly start realising dimensions which they
have not mentioned. Many are the times, when our program
had to be changed fairly drastically. But the flexibility
available with these languages have made things much easier
to live with under the circumstances. I would have certainly
given up if I were doing something like that in C-like languages.

Another important aspect is how do people use these languages? I have
seen Lisp/Prolog programs which look more like C/Pascal programs.
You can see the same algorithm, same control flow. If you view
these languages just like the conventional procedural languages,
of course, your code is likely to be much less readable and
maintenable (and efficient) than equivalent C-code. And typically
even the compiler gives up any attempt at optimising such programs.
While teaching courses, I have seen this very often. As they learn
the philosophy of the language and think in that fashion, they
feel the difference. I am sure the same holds for C++ also.
I, for one, find it hard to visualise my applications in
a totally object oriented form. If I dont follow the object
oriented structure and think/program in that form, will my
C++ code be any better (efficient,readable,etc) than my
code in any other language? And in a similar spirit if I
am going to code an algorithm designed for an object oriented
paradigm directly, in Prolog/Lisp, I would be very likely
to be disappointed. I dont think you can move algorithms
and programming structure across these different types of
languages - you can probably move ideas. And I get the feel
that much of the confusion about suitability of languages
arises from trying to do this.

Largely the problem with programming practices today is the
lack of thinking about the problem from the point of view
of the programming language being used. People often feel that
using an appropriate tool will suddenly make them better
programmers. I feel this is a petty notion. And if you
do pause to think and plan out your solution carefully
you can write pretty good programs even in C!!!

Just my two paise worth! I would be happy to listen
to your comments on these....

 - sasi
+-------------------------------------------------------------------------+
|Sasikumar M,  KBCS Group               : Email: sasi@saathi.ncst.ernet.in|
|National Centre for Software Technology: Phone: 62 01 606 x 41 ==========|
|Gulmohar Cross Road 9, Juhu            : Fax: 022-621 0139 ==============|
|Bombay - 400 049, INDIA                : ================================|
+-------------------------------------------------------------------------+
