Feeling slightly heretic today, I'd argue for going ANSI in the
stricter sense [1] and getting rid of SLOOP entirely. In light of
recent c.l.l. discussions on IF*, I'm afraid that a "modern" CL hacker
will have a first look at the Maxima code, exclaim "yuck, they even
use a home grown replacement for ANSI loop", and walk away.
I've tried the SLOOP -> LOOP exercise myself and I'll take this
opportunity to summarise my experience. The diff -rU4 weighs about 24k
and is dominated by stuff like LOOP-RETURN -> RETURN, IN-ARRAY ->
ACROSS and
- (sloop for (key arg) on keyword-rest-arg by 'cddr
+ (sloop for (key arg) on keyword-rest-arg by #'cddr
The most obscure change was to replace NLEFT with CL:LAST - which is a
good thing (NLEFT was implemented using SLOOP and didn't work with
LOOP). I also had to replace a couple of macros (P-RED and friends)
because they were misused as functions.
Yes, I know I shouldn't fix what is not broken. However, for a
suitable definition of the b-word, SLOOP *is* broken. I do see the
lack of regression tests as a strong argument for not doing changes of
this kind. My SLOOP -> LOOP passes all doc/rtest*.mac but I know
that's far from full coverage.
Regards, Ole
--
[1] Not using local replacements when the standard has a perfectly
good solution.