2 ms·
Unpopular opinion that doesn't even disagree with you. LOOP is superior to rackets for loops. The minimizing and maximizing constructs are surprisingly readab
by taeric 7y ago
Unpopular opinion that doesn't even disagree with you. LOOP is superior to rackets for loops.
The minimizing and maximizing constructs are surprisingly readable.
- bjoli 7y agoI agree to some extent. To get the same power from rackets loops you have to do a lot more work using for/fold. I have an implementation of rackets loops for guile scheme, and I'm currently rewriting it to allow arbitrary transformations in the loop clauses. Say I want to write a Fibonacci loop, currently I can't do this: (for/list ((a :first 0 :then b) (b :first 1 :then (+ a b))) a)
- bjoli 7y agoI forgot to mention that loop requires a lot of mutation, which sort of sucks in scheme world where you can use multi-shot continuations and ruin the fun. There are loop implementations for racket (which produce decent code and all that), but they are rarely used.