guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'


From: Neil Jerram
Subject: Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'
Date: Mon, 1 Sep 2008 22:19:12 +0200

2008/9/1 Han-Wen Nienhuys <address@hidden>:
>
> On a tangent, is anyone still seriously considering to run Emacs atop GUILE?

Running a whole Emacs on top of Guile? - no.

Running some Emacs Lisp code on top of Guile? - yes.

But I admit that what I have in mind is still vaporware right now.  So
I guess that if Guile's current infrastructure for trying to support
Elisp became a serious obstacle to progress, we should not rule out
dropping it.

> +  for (; !SCM_NULL_OR_NIL_P (lst); lst = SCM_CDR (lst))
> +    {
> +      SCM_VALIDATE_CONS (2, lst);
>
> Looks cleaner to use SCM_CONS_P (or whatever it is called) as loop guard,
> so it is obviously correct, and crash if the lst is not properly terminated
> after the loop (- perhaps only if we're not compiling in optimizing mode).

I don't think we should do that.  I agree that the code would _look_
cleaner and more obviously correct, but in fact the code _is_ correct,
and changing it would lose the Elisp support.  And I don't think the
code as it stands is (anywhere near) so obscure as to justify losing
that.

Regards,
     Neil




reply via email to

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