Hi Tomas,

> I see that you take big pain to optimize things a lot.  I would

Not intentionally ;-)

I don't really mind so much about the actual performance, but more about
the underlying principles. And I feel that it is not the "right thing"
to waste a cell at each primitive iteration through a loop.

To tell the truth, in the past I was thinking a few times about a way to
access the counter in 'do'. Not the syntax you proposed, but of a
function like (i) that returns a copy of the current counter. But in the
end I thought it is not a good idea to overload 'do' in such a way.

Also, in Lisp the loop index is usually of much less importance than in
languages like C or Java, where iterating arrays with an index variable
is a very frequent operation. Do you really think you would need such
a feature often?


> much better than saying
> 
>   (for (I 1 (<= I 5) (inc I)) (print I) "finished")

I also don't like that (but fortunately did not often need it).


How about

   (let I 0 (do 5 (print (inc 'I)) "finished"))

At least, explicit constructs with 'for' or 'let' give us more
flexibility.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to