Hacker Newsnew | comments | show | ask | jobs | submit login

a complex DSL that few programmers bother to learn

What? Plenty of CL programmers learn LOOP. It's unbelievably convenient; as far as I'm concerned it is a masterpiece of usability. An abomination? Perhaps. Crack is an abomination and it's a masterpiece of usability too. But I don't care. I'm not a purist, and LOOP makes my work easier and more fun.

Complex DSL? Complex to specify, perhaps. Complex to implement? Not that bad. I wrote a pretty big subset of it for Parenscript and it wasn't hard. Complex to use? Not at all.

The reason many Lispers dislike LOOP is that it's un-Lispy. It's a foreign body implanted in the Lisp organism. Interestingly, though, CL's immune system doesn't reject it, meaning that it interoperates fine with everything else. If there were an impedance mismatch, LOOP wouldn't have lasted.




I use loop for simple things, but iterate is more general. For example, you can put your collect forms inside other forms, not just at the loop "toplevel". Also, editing larger chunks in an iterate form is easier, and automatic indenting works better.

-----


ITERATE is one of those tastefully designed macros, very intuitive to a LOOPer.

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: