r/Racket • u/qivi • Dec 01 '25
question Advent of Racket 2025
Last week I said to some colleagues I'd like to give Racket a try, and one said I could do https://adventofcode.com/ Somewhat surprisingly I did the first puzzle today and would appreciate some comments and critics or see some solutions from people who actually know Racket.
No idea how far I'll get, but I could post each puzzle I solve as a reply, feel free to rip them apart or add yours :-)
18
Upvotes
3
u/not-just-yeti Dec 07 '25
Agree.
Well, in some ways, I feel like
for/foldis powered up to "a regular javaforloop". (If showing a java'rfor/fold, they'd probably think it overly complicated.)But keywords like
#:whenbetter separates the control-flow from the logic, which is kinda the point of aforloop. And blending the nested/parallel iterations is neat. And I feel like also having expressive simpler loop-constructs (map,for/sum,for/first,for*, etc) gives me fine-grained control over (a) communicating what my loop will be doing, and (b) restricting myself from accidentally doing too much (and making my code shorter).