4 ms·
>The point, of course, is that trying to create "one macro to rule them all" is already wrongheaded. There shouldn't be one universal iteration construct. I ag
by sjolsen 12y ago
>The point, of course, is that trying to create "one macro to rule them all" is already wrongheaded. There shouldn't be one universal iteration construct.
I agree that MAPCAR et al. should be used when they're appropriate. They are, however, sometimes simply not, and it's important to be able to build code to handle those cases. You don't need LOOP for that, since you can always use TAGBODYs and GOs, but LOOP is almost certainly more appropriate, just as MAPCAR et al. are usually more appropriate than LOOP.
In other words, yes, there should be a universal iteration construct; there just shouldn't be only a universal iteration construct. There's nothing wrong with having multiple tools at different abstraction levels for the same group of tasks, and I'd argue that it's usually a good thing.
- ScottBurson 12y agoI agree it's great to have multiple tools; and obviously at the low level there has to be something universal that everything else is implemented with, whether that's TAGBODY/GO, DO, or tail recursion. But I still think LOOP tries to be the solution to too many problems. Worse, it attempts to replace compositionality -- the rules of the language by which more complex expressions are built up from simpler ones -- with vocabulary. Oh well. I've made my case -- I'll shut up now :-)