[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Dylan implemented on Common Lisp



gclement@keps.com (Geoffrey Clements) writes:

> When you ask people what they are using Lisp for, most answer with
> some form of AI problem.

That's indeed a difficulty: with people, not with the language.  I
suspect many such responses come from people who aren't themselves
frequent Lisp programmers (such as the people that write
survey-of-programming-languages textbooks, and the people who believe
those books).

> I'd really like to see it.  Especially systems programming
> examples. Give enough detail so that I can see why using Lisp is
> better than using say C.)

Much of the traffic of any program -- including a "systems" program --
has to do with maintaining data structures, defining abstractions, and
handling control.  In each of these, a language like Lisp or Scheme is
virtually unmatched.  Automatic memory management of data structures
is a big win.  First-class functions (closures, really) are too.  And
so are continuations, engines, catch/throw and so forth.  In addition,
you get type safety, which is a *huge* win over C.  Finally, if you
want to provide "extended languages" to your users, hygenic macros are
done better nowhere else.

Much of the difficulty in writing a word processor, say, in a Lisp-ish
language is having access to the underlying system.  This a problem
because the underlying systems -- themselves usually written in
something like C -- need to be interfaced with.  Simple libraries
usually solve this problem effectively.  For instance, at Rice, we
have implemented an interface to X using Chez Scheme's foreign
procedure interface; a few hundred lines of mostly repetitive
type-definition code, and the programmer never sees the underlying X
system now.  GNU Emacs's Elisp is a good example of what such a system
might look like (though itself very far from ideal).  To see how far
you could go if you do* have easy access to the underlying system,
take a look at most any Lisp Machine.  I don't believe we've still
matched some of the functionality of those systems in our contemporary
interfaces.

'shriram