I think the symbols named 'until and 'while might conflict, but you should be able to work around that if you really want, because neither loop nor iterate have function bindings for them.
Jasper wrote:There really isn't any source of confusion in how you arranged things in with-easy-arrays, just a little pet worry of mine. Sometimes it is just a personal preference, just like you liked 1ref, 1elt, don't think those personal preferences are very productive, by the way. It may be a distraction, especially in dealing with other people's code.
I think that they shine (true, my preference ) when I want to write some bits of array processing code in mathematical style, and since I don't have an editor that can do LaTeX style code rendering , I'm pretty happy with things like this . Having said that, perhaps they're not what you were looking for when you started the post .
About def-setf-fun, I looked at it and went - cool! I think it's great for the simple case, like some other language's getters and setters, but I can't think of a situation when I want to put anything else in body (but that doesn't mean such situations don't exist).
Dolda wrote:And finally, how comes CL doesn't come with a built-in definition of WHILE?
I have got a while in my utilities file, but I rarely use it. For me it hasn't been fear, but just that loop and other tools do a better job, one way being to provide the 'state' variables to use destructively. So I use things that kindof look like (in a loose CLHS sense ):
- Code: Select all
(loop [with state = blah] while condition do stuff do other-stuff)
(iter [(with state = blah)] (while condition) multiple forms to do stuff)
Note that while could be replaced by until if that removes a not, it's also defined in both loop and iterate.