Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unpopular opinion that doesn't even disagree with you. LOOP is superior to rackets for loops.

The minimizing and maximizing constructs are surprisingly readable.



I 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)


I 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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: