|
Boost : |
From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-05-25 23:00:22
From: David Abrahams <abrahams_at_[hidden]>
> From: "Greg Colvin" <gcolvin_at_[hidden]>
> > I recall considering Python as an extension language for XVT back in
> > 80-something, but going with Scheme instead. I still like Scheme for
> > that purpose.
>
> Innat some kinna lispy language with lots of parens? I've been writing some
> elisp code for emacs recently, and boy I really wish emacs had been based on
> Python. It's just too hard to tell what's going on when all the code looks
> the same. Maybe it's all in what you're familiar with, but OTOH I knew lisp
> for 15 years before I learned Python and I like the latter better. What made
> you settle on scheme?
This is probably getting off topic but ...
The application was to describe a GUI with a visual editor and
generate the corresponding C or C++ code. Lisp was nice because
it deals well with trees and lists of arbitrary stuff -- windows,
controls, etc.; it has a canonical form for writing out all that
stuff to file; it is easy to run functions over that stuff and
transform it into new stuff, like C++ code; I could write an
interpreter for the parts of it I needed in a few hundred lines
of C++; and I could integrate the interpreter so that it was easy
to call lisp functions from C++ and write lisp functions in C++.
I found I got used to the parentheses, and the regular syntax
makes the code easy to parse and easy to manipulate with tools.
The design was that the visual editor filled up a bunch of C++
containers with GUI elements, and those containers used a lisp
data structure internally. The lisp interpreter could write those
to a file as more-or-less readable lisp text, and could read them
in along with the code generation rules, which were written as
lisp functions to be run against the GUI element data.
Still, Scheme and other lisps are probably not the easiest
extension languages for the average user, which is where we were
leaning towards Python.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk