I do have a softspot for how this is embracing the parens. :D
This is funny in that it seems to dodge the biggest complaint of loop, that it has different syntax for lists and vectors/hashtables.
> Previous doesn't have the same flow,
I have provided a clause macro that uses the exact syntax you showed, you don't have to use previous.
My point on "in-sequence" and such was more that the main complaint I ever hear regarding LOOP is that:
(loop for c across "hello"
collect c)
is not the same as (loop for c in '(#\h #\e #\l #\l #\o)
collect c)
Specifically, "in" versus "across" seems to upset a lot of folks. I don't recall ever hearing too many complaints about the syntax not being more nested.Again, though, looks neat and I'm excited to dive more into it.
Yeah, I can see how having distinct keywords may be seen as inconvenient. I think if there were a general container-keyword that wouldn't introduce any cost based on a type declaration, that would be cool, but it's not something I have encountered a real need for.
Now, to the translation: iterate has previous clause. https://iterate.common-lisp.dev/doc/Previous-Values-of-Drive... which may help translate the loop form you provided into this:
However, if you wanted that exact syntax, you could try: to get a direct translation: > Moving all things to s exprs doesn't seem like it would be that big of a deal.One of the biggest things you will "miss" from LOOP is the do keyword. The control structures is just regular lisp code. Also, I found generators to be pretty handy (not often, but I am glad I had them when it was called for).
I mean, it's not exactly groundbreaking, but it does make a difference especially that a looping construct is probably the heaviest-used macro. You can certainly get away with LOOP, but I see iterate as more or less how LOOP should've been done.
I also recommend reading this short discussion in the manual https://iterate.common-lisp.dev/doc/Don_0027t-Loop-Iterate.h...