Original post by Vlion
Oooh, look, a loop construct in lisp. How underused but useful.
This is called elementary procedural programming. This is what you learn in week three of CS101. I'm sorry, but I laugh.
The point about the loop construct wasn't (just) that it is more powerful than similar looping constructs in other languages, but that it was _added_ [EDIT:] on top of the[:EDIT] Lisp language. If it wasn't there, you could have added it yourself. Now _that_ is something you can't do in that many languages.
The caching/memoizing construct is interesting- on thought it wouldn't be difficuly to write some c++ construct to do it. Would have been nice to see the implementation though.
The implementation was on the page I linked to, though slightly above. What would be a C++ equivalent of this?
AP: I did do some study and learning. I spent 4-6 weeks trying to work out a concept in lisp. I'm asking this question based on my experience in lisp.
I would Submit that string work is non-intuitive in lisp, as I worked somewhat with strings in my code and found the mechanisms difficult to work with clearly.
This is the exact same experience I've had with Lisp. It's very obvious that there are very many things to love about Lisp (dynamic types, first class functions, lambda functions, symbols, the interactive way of coding - with instant access to compiler, debugger and execution at the same time, mapping functions, lists, macros) and it's very easy to find things that wow me away (On Lisp is full of such examples), but when the time came for me to actually do something in Lisp, it was all very complicated and clunky, and all the functions I need seemed to be missing. Things will get better with practice (lots of it), Lisp isn't a side language you learn fast and use right away, but you should be able to see that there's more to Lisp than lots of paranthesis. [edited by - Diodor on February 22, 2004 5:28:49 AM]