all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Why are there two dolist?
Date: Wed, 12 Aug 2009 01:04:05 +0200	[thread overview]
Message-ID: <e01d8a50908111604s6d4423d0l1837f691011b40e1@mail.gmail.com> (raw)
In-Reply-To: <87d472m0b0.fsf@catnip.gol.com>

On Wed, Aug 12, 2009 at 12:51 AM, Miles Bader<miles@gnu.org> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> 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.
>




  reply	other threads:[~2009-08-11 23:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 22:14 Why are there two dolist? Lennart Borgman
2009-08-11 22:36 ` Lennart Borgman
2009-08-12  8:45   ` David Kastrup
2009-08-12  8:52     ` Lennart Borgman
2009-08-11 22:37 ` Miles Bader
2009-08-11 22:42   ` Lennart Borgman
2009-08-11 22:51     ` Miles Bader
2009-08-11 23:04       ` Lennart Borgman [this message]
2009-08-11 23:30         ` Harald Hanche-Olsen
2009-08-11 23:34           ` Miles Bader
2009-08-11 23:41             ` Lennart Borgman
2009-08-11 23:48               ` Miles Bader
2009-08-11 23:39           ` Lennart Borgman
2009-08-12  0:27             ` Harald Hanche-Olsen
2009-08-12  0:33               ` Lennart Borgman
2009-08-12  0:54                 ` Miles Bader
2009-08-12  0:59                   ` Lennart Borgman
2009-08-12  1:24                 ` Harald Hanche-Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50908111604s6d4423d0l1837f691011b40e1@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.