Could Emacs be rewritten in Python?

Christian Tanzer tanzer at swing.co.at
Tue Apr 8 03:01:05 EDT 2003


pobrien at orbtech.com (Patrick K. O'Brien) wrote:

> tanzer at swing.co.at (Christian Tanzer) writes:
>
> > martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) wrote:
> >
> > > pobrien at orbtech.com (Patrick K. O'Brien) writes:
> > >
> > > > Are there translators out there?  I looked and couldn't find any.
> > >
> > > Parsing S-Expressions is fairly trivial - they are designed to be
> > > readily parsable. For a full translator, you need to define the
> > > language mapping first, i.e. how do you want to represent atoms,
> > > function names, etc.
> >
> > I expect the main difficulty to be the difference in scoping
> > models -- the dynamic scoping of Elisp is probably pretty hard to
> > simulate in Python without incurring major performance problems. And
> > that's used by lots of Elisp code, so skipping it is not an option if
> > you want to have comparable behavior.
>
> I'm starting to think this will be the reason *not* to mimick the
> Emacs API as closely as I originally thought.  I have neither the
> time, energy, nor interest in making an elisp to Python translator.
> So I think a better approach will be to simply create a new, Pythonic
> API that allows the same kind of programmability as Emacs, but without
> trying to adhere to the Emacs syntax or "object model."

I wouldn't worry about translating elisp to Python. OTOH, as others
pointed out, Emacs contains lots of crufty-looking hacks which are
there for good reasons. If you want to implement something comparable
to Emacs' power, you'd better look at the Elisp Reference Manual for
quite a while.

looking-forward-to-a-pythonic-Pmacs-ly y'rs,

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92






More information about the Python-list mailing list