In article <sfw65ho18l7....@shell01.TheWorld.com>,
Kent M Pitman <pit...@world.std.com> wrote:
> DO* compounds the injury by allowing you new ways to misuse k. For example,I waffle on this. Sometimes I favor the conciseness of the
> it might be that it really isn't even used twice--perhaps it's only used
> again as an input, but you're putting the step in a strange place. That is,
> if you're doing:
> (do* ((x (compute-x) ...)
> you are really probably meaning to do
> (do ((x (compute-x) ...)
> which would be much more intelligible to most poeple.
DO* version -- all the variables being changed on each
iteration are gathered in one place. Sometimes I favor the
clarity of the DO/LET version.
> Almost always, in my experience, DO* ends up in a case where someone isI guess I would be one of those objecting. I'd favor
> not understanding the base case and both the init and the step situation
> for the dependent variable is too complex. Not always. There are some
> idiomatic cases that are not like this. But in those cases, a great many
> are better expressable using a LET in the body. Some object that this
> means the exit test for the DO isn't set up "in time" to use the inner
> LET variables, but that's easily dealt with by making the loop not
> terminate and doing an explicit test in the loop body.
stepping the dependent variable along with the independent
variables rather than (1) leaving the termination test
empty and (2) providing an explicit RETURN-FROM (or
something similar) in the body, all things being equal.
I saw some categorical denouncements of DO* earlier in this
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.