From: David B. Kuznick
Subject: Re: Future of Lisp
Date: 
Message-ID: <9507211431.AA29640@pharlap.ci.com>
·····@luke.Read.TASC.COM (Jonathan Cohen) writes:

|> One of the advantages lisp has over C and C++ is that it avoids memory
|> leakage by using garbage collection.

It doesn't *avoid* memory leakage (nothing to stop you from continually pushing
stuff onto a list and forgetting to set the list to NIL when you no longer need
it), but it frees you from having to explicitly manage heap-allocated memory
yourself.

 I've recently started using a
|> product called Purify that seems to do a very good job of detecting
|> memory leakage in C++ programs. It even seems to handle circular
|> data structures properly in that it reports as leakage a pair of
|> objects that point to each other. Since with enough testing it seems
|> reasonable that all leaks could be removed from even a large C++ program,

What does "enough testing" mean?  I have my doubts that Purify can detect/remove
ALL leaks, but never having used it, I'll have to take your word for it. 
Besides, it still doesn't remove the burden of having to manage memory yourself.

|> I'm wondering if Lisp has lost its advantage in this regard. 
|> Garbage collection imposes two problems as I see it: the interruptions
|> it causes

Just curious as to what modern Lisp implementations you are basing your data on. 
GC's are hardly noticeable nowadays on the workstations I use.  In fact they're
usually less noticeable than the typical network and disk pauses which can plague
any program.  And in C/C++ you can get interruptions during malloc and free also.

 and also pinning down the address of a non-static object,
|> which makes calling into Lisp from another language too complicated.

Again, I ask what modern implementation are you basing your data on?  In Lucid
and Harlequin, callbacks are *trivial*.  In Allegro they require a little extra
work, but not much.

|> Is there even a lisp tool that can track down points in source code
|> that generate garbage, tracing back the call stack, as Purify does?

A good profiler helps here.  It can show you where consing occurs in which
functions.  Granted, I haven't seen anything as sophisticated as Purify (and it
would be nice to), but this is mainly because there isn't the same burning need
as in C/C++.  But it would be something I'ld like to see.

|> 
|> Many of the other advantages of Lisp, such as interpreting constructed
|> objects, can be replicated in any language.

Let's say "simulated".   There are certain things you just can't do in an
environment-less language that you can in an evironmentful-language (notice I
stayed away from the compiled vs. interpreted issue.  It's really the presence of
an environment in Lisp that makes it very different from C and friends, since
there are Lisps out there that always compile everything).

 Even the ability to
|> define new, specialized languages is not unique to Lisp with all the
|> tools available that are based on parser generators (e.g. yacc).

Oh boy!  Having used both Yacc and Lisp macros *extensively*, there's no way I
can buy into that statement!  No, it's not "unique" to Lisp, but the ease and
power of its macro system pretty much is!

|> Given the realities of the job marketplace, its hard to find project
|> managers willing to use Lisp.

You have to know where to look! I seem to.  :-)

 And now its seems that the commercial
|> Lisp compilers are getting very expensive (although I haven't researched
|> that thoroughly).

Than maybe you should hold off commenting for now.

 Its to the point that even a lisphead like myself
|> must serious consider porting existing Lisp code to C++ in order
|> to more easily attract people willing to maintain this code.

Certainly a valid issue.  Just make sure you really weigh the pros and cons. 
Ever been involved in a *huge* C++ project or a *huge* Lisp project?  Have you
ever ported a *huge* Lisp system to C++?  Two words: it sucks.

|> So what are the future prospects of Lisp?

I'ld love to know.

David Kuznick - ·····@ci.com (preferred) or ········@world.std.com   ___   
All your spirit rack abuses come to haunt you back by day          {~._.~} 
All your byzantine excuses given time give you away                 ( Y )  
Don't be surprised when daylight comes                             ()~L~() 
To find that memory prick your thumbs                              (_)-(_) 
You'll tell them where we run to hide   - "Afraid of Sunlight"  - MARILLION