[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why are there two dolist?
From: |
Lennart Borgman |
Subject: |
Re: Why are there two dolist? |
Date: |
Wed, 12 Aug 2009 01:04:05 +0200 |
On Wed, Aug 12, 2009 at 12:51 AM, Miles Bader<address@hidden> wrote:
> Lennart Borgman <address@hidden> writes:
>>> Most people will never see the cl-macs version; those who _should_ see
>>> it will, because they'll have done (require 'cl) first; since the
>>> cl-macs version supports the basic subr.el usage, it's OK if some code
>>> that doesn't need the extra features ends up se
>>
>> Does not this open to subtle bugs?
>
> I think it's such a simple macro (at least the basic subr.el version is) that
> this isn't such a big problem.
>
>> Would it not be better to move the cl-macs.el version to subr.el?
>
> I haven't looked at the code (recently), but because elisp doesn't
> natively support lexical blocks, I suspect the cl-macs version either
> (1) adds unnecessary runtime overhead, or (2) drags in lots of big and
> crufty compile-time analysis code (cl.el has lots of this) to optimize
> away the block when not used.
Yes, but I wonder whether it does something useful at all. Someone who
understands lisp better could maybe tell.
Maybe the CL version should go away instead? It creates a lexically
scoped block with a name nil. The explanation in (defmacro block ...)
does however not say what is lexically scoped so I have no clue. (And
I do not know if return-from mentioned there can work with a nil
name.)
However if if means that one dolist version makes VAR lexically scoped
and the other does not, then the difference is big. And one of them
should leave.
> -miles
>
> --
> Religion, n. A daughter of Hope and Fear, explaining to Ignorance the nature
> of the Unknowable.
>
- Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Miles Bader, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Miles Bader, 2009/08/11
- Re: Why are there two dolist?,
Lennart Borgman <=
- Re: Why are there two dolist?, Harald Hanche-Olsen, 2009/08/11
- Re: Why are there two dolist?, Miles Bader, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Miles Bader, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Harald Hanche-Olsen, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Miles Bader, 2009/08/11
- Re: Why are there two dolist?, Lennart Borgman, 2009/08/11
- Re: Why are there two dolist?, Harald Hanche-Olsen, 2009/08/11