[iterate-devel] Fwd: if-first-iteration, a little better version as an arch patch
Hoehle, Joerg-Cyril
Joerg-Cyril.Hoehle at t-systems.com
Mon Jan 9 12:20:59 UTC 2006
Attila Lendvai wrote:
>and a tla undo patch this time.
Ah, I was wondering what the many strange files meant :-)
I wonder why people submitting patches tend to write code against Iterate's internal structures, instead of writing using the external interface?
After all, being able to expand Iterate via regular macros was one of John Amsterdam's design goals.
What about something along
(defmacro-clause if-first-iteration (then &optional else)
`(progn (with ,(gensym) = t)
(if ,gensym ,then ,else)
(after-each (setq ,gensym nil)))
If you really want to hack the internals, I suggest not introducing another special variable, but instead add to the existing binding variables.
You can still generate a single variable for all uses of IF-FIRST-ITERATION in one Iterate by using a technique similar to that of iter::return-extremum-code. That would integrate better IMHO into the existing code base.
Regards,
Jörg Höhle.
More information about the iterate-devel
mailing list