[Top][All Lists]

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

Re: eon.el --- object-oriented programming for emacs

From: David O'Toole
Subject: Re: eon.el --- object-oriented programming for emacs
Date: Tue, 04 Sep 2007 10:43:04 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.50 (gnu/linux)

address@hidden writes:

> Did you look at eieio?

Yes. Its design is based on CLOS. I enjoy writing CLOS programs but I
didn't think the design fit the requirements of the emacs stuff I'm
working on. For various reasons I wanted a prototype-based object
system, not one with classes.

I have some other nitpicks; here is an excerpt from the eieio manual:

>    with-slots entries object forms 
> Bind entries lexically to the specified slot values in object, and
> execute forms. In CLOS, it would be possible to set values in OBJECT
> by using setf to assign to these values, but in Emacs, you may only
> read the values, or set the local variable to a new value.

This restriction makes it annoying to write methods because you need
to type out the long form if you want to store anything. To me it is
crucial to have a clean syntax, because if it's annoying and
cumbersome to refer to your own slots when writing a method, nobody's
going to use the object system. So I used a combination of defsetf and
symbol-macrolet (plus a little help from defalias) to make what appear
to be local variable references into slot lookups/updates.

(It seems like the author doesn't know about the cl package---that's
unfortunate because it is just about the most useful Emacs Lisp
library out there, especially if you are trying to extend the

> EIEIO also supports the byte compiler for Emacs and XEmacs. Because of
> the nature of byte compiling, EIEIO is picky about the version of
> Emacs you are running. It supports Emacs 19.2x+, 20.x, 21.x, XEmacs
> 19.1x, and appears to work on XEmacs 20.x and 21.x. 

1. This seems wrong to me. Why is eieio so involved in
byte-compilation that different versions of emacs can break it?

2. Is emacs 22 supported? It's not in the list...

David O'Toole 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]