Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

October 2004
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Sep  Nov

Loop extensibility

Sunday, October 3, 2004

A few days ago, Zach pointed to the announcement on c.l.l. of a new implementation of Loop. The new Loop implementation code was interesting in itself, as was the Sacla project which it is part of (Sacla is an attempt to create a complete implemenation of CL in CL). However, I've been reading the discussion on c.l.l. which followed the initial announcement, and the thread has some interesting comments on how to extend Loop.

Carl Shapiro noted that Lucid had documented writing extensions to the Loop macro in their Loop Facility manual. Unfortunately, the extensibility mechanism does not appear to be present in all CLs today; however, it does appear to exist (and I did manage to test it) in LispWorks. This User extension mechanism allows a programmer to extend the predefined loop itereation capabilities by using loop methods. For example, the following types of extensions are possible:

Have a look at the Loop Facility manual for other examples of how to extend Loop.

Since the Loop Facility's extensibility mechanism doesn't seem to be in the ANSI standard Loop Facility definition and is not in all CL implementations of Loop, I'm not sure whether Loop extensibility is something that is only present in Xanalys LispWorks or whether there are equivalents in other CL's.

emacs Copyright © 2004 by Bill Clementson