Comment

Comment by bjoli

Leaving the comfort of lisp, I have started to wonder: why are all the looping facilities in other languages so awful?

Standing on the shoulders of giants, I made this little abomination: https://rikspucko.koketteriet.se/bjoli/goof-loop

It handles 98% of all loops I write, meaning I don't have to manage state (even for things like treating things like circular data). I find it removes many of the stupid errors I make when iterating over data, especially when I need nested loops and conditional accumulation.

I find it so provoking that someone implemented foreach and went "yes. That should be enough for everyone!"

parent bjoli 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton