by nescioquid · 2y ago · 0 comments
>> Seemingly, the intended way to use the LOOP facility is to just "guess" a way to express an iteration and see if it works. If it doesn't you can either look up the specifics ...
Since then, I do just guess at the syntax and it strangely does what I want most of the time.
It seems that a library like this has a lot to prove because a) it doesn't provide a new capability, b) it adds a project dependency, and c) creates yet another way to do a standard task. If you really don't like the loop macro, you probably don't need much persuading, but I would have liked to have seen more discussion on the these trade-offs.
Only css is done this way... but not even intentionally
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node235.html
The grammar for what's accepted by Loop is well specified, but the results also read very clearly. Once you learn a few of them, you start to understand how the rest would be written and can guess, but the design is not that you would guess.
Perl was famously that way. It's great for the initial write but not so good for maintenance.
Learning to use perl -properly- is a whole other barrel of monkeys though.
(it does have the advantage that it's very easy to spot code written by a confused perl programmer, whereas I've experienced a number of unfortunate events where python code initially looked fine but turn out to be logically utterly confused; this is not a complaint about python, though it does darkly amuse me)
Either way I think they were looking for a recursive solution. Oh well, they still invited me to lunch, though.