5 ms·
I used to scoff at it at first, but after a few years of CL programming loop is one of my favourite CL constructs :)
by awkravchuk 2y ago
I used to scoff at it at first, but after a few years of CL programming loop is one of my favourite CL constructs :)
- taeric 2y agoI'm with you there. Is a bit of a mind bend, as I really disliked it the first few times I saw it. For an even sillier mind bend, I'm using tagbody to be able to directly transcribe some of Knuth's algorithms as I am learning them.
- awkravchuk 2y agoCool! Using tagbody feels like writing supercharged C or even assembler to me (not that I've used it much, but still).
- CyberDildonics 2y agoI don't understand why turning a simple loop into a 'mindbend' is considered good. The downfall of programming is complexity, if you're getting your mind blown by a loop how are you going to do the rest of the program?
- zelphirkalt 2y agoSomething can be mindbending in its implementation, but offer a very convenient interface at the same time. If mindbending isn't relating to its usage, but to its implementation, then I could see, how it could still be a good thing.
- exe34 2y agomindbending can also refer to something being deceptively simple. you might think it would be a big complicated mess, but using this one weird trick makes it really obvious what's going on.
- CyberDildonics 2y agoHow does that relate to a simple loop construct though? Why would you want that to be mind bending in interface or implementation? Every other language makes it as simple as possible.
- SatvikBeri 2y agoThis isn't really true – you have languages like Odin that only have a for loop, no while loop, that only supports index-based iteration. Then you have languages like Python that let you loop over an arbitrary iterable, and define your own iterables. Some languages allow conditionals in loops, some don't. Some let you loop over multiple iterables, while some only take one at a time. Common Lisp happens to be on the upper end of what loop allows – you can use it as a standard for loop pretty easily, but the interface gives you many other options.
- medo-bear 2y ago> Common Lisp happens to be on the upper end of what loop allows – you can use it as a standard for loop pretty easily, but the interface gives you many other options. If you really wanna get freaky try 'do. It is the heroin addicted cousin of 'loop https://www.lispworks.com/documentation/HyperSpec/Body/m_do_do.htm https://www.lispworks.com/documentation/HyperSpec/Body/m_do_...
- shawn_w 2y ago`do` is very straightforward and basic compared to the things that `loop` allows.
- medo-bear 2y agooh no. maybe you have in mind 'dolist or 'dotimes 'do is much more general and way more powerful. in some sense 'loop is the taming of 'do. see for example https://www.lispworks.com/documentation/lcl50/loop/loop-7.html https://www.lispworks.com/documentation/lcl50/loop/loop-7.ht...
- taeric 2y agoThe mindbend was more of my approach to the construct. It began with disdain before even really using it much. Looking back, I really couldn't articulate what I disliked about it.
- 0xdeadbeefbabe 2y agoHe started with a bent mind though.
- medo-bear 2y agoSimple minds loop simply
- CyberDildonics 2y agoI don't think this comment means anything or contains any information.
- medo-bear 2y agoColorless green ideas sleep furiously
- CyberDildonics 2y agoThis seems like you're replying with nonsense. Did you have anything coherent to say?