Thursday, June 14, 2007

Emacs Lisp Advice, Aspect Oriented Programming And Beautiful Code

Beautiful Code is a forthcoming publication from O'Reilly Media that brings together a collection of essays on software design. It includes a chapter on Emacspeak --- a speech-enabling extension built using Lisp's advice facility. Emacspeak provides an interesting study in the use of Aspect Oriented Programming to add spoken feedback to a large software system (Emacs) without changing any of the underlying Emacs source code. Note that Lisp's advice facility was the prime motivator behind Aspect Oriented Programming. Advice in Lisp, and the technique of Aspect Oriented Programming in general provides a pragmatic solution to the problem of implementing additional cross-cutting concerns such as adding spoken feedback to large software systems. This form of implementation is also a practical yet powerful means to discover extension points in large codebases.