4 ms·
Practical CL (written with Java mindset) is a waste of time, compared to PG's ANSI CL which has more idiomatic, subtle examples. Then On Lisp, of course. HtDP
by dschiptsov 13y ago
Practical CL (written with Java mindset) is a waste of time, compared to PG's ANSI CL which has more idiomatic, subtle examples. Then On Lisp, of course.
HtDP should go before SICP. HtDP2 is a much better reading than old HtDP. In both books exercises must be done.
PAIP is a decent reading, but mr. Norvig, it seems, dislikes macros and recursion and prefers strictures and loops.)
btw, all the books are "available" on piratebay, if you are not too strict or american.)
- momo-reina 13y agoI had a few discussions with some guys at #lisp, they looked over some code I'd written that was recursion-heavy, and they were of the mind that since Tail-Call Optimization is not in the ANSI standard and therefore implementation dependent one should be careful when using them. Now that totally changes if you're writing Scheme...
- dschiptsov 13y agoAll non-toy CL implementations do TCO nowadays. http://0branch.com/notes/tco-cl.html http://0branch.com/notes/tco-cl.html Anyway, it is worthwhile to practice writing recursive solutions (beginning with Scheme) to understand possible pitfalls in case of non-tail recursion, and then, proudly, switch to fixed-space looping techniques.)
- momo-reina 13y agoYeah I've blown the stack more times than I can recall when using non-tail recursion. I do enjoy recursion, it seems like a clean and elegant solution, though I'm ridiculously preoccupied with writing non idiomatic code. Pascal Costanza has an interesting opinion[1] on why TCO wasn't included in the ANSI standard. [1]http://www.p-cos.net/lisp/guide.html http://www.p-cos.net/lisp/guide.html
- lispm 13y agoThere are a few problems with TCO in Common Lisp: * some platforms don't provide useful support (in the History it were some stack-oriented Lisp Machines, nowadays it is the JVM - see ABCL) * there is no consensus how it should be invoked, how its effect should be reported by a compiler, how the user should be noted about limitations (example: LispWorks limits the number of variables), ... * it is not a good fit with Common Lisp, since the language supports all kinds of dynamic constructs: dynamic binding, unwind-protect, ... It is not clear how this should interoperate with TCO in CL. * it makes debugging more diffcult (backtraces, trace, ...)
- momo-reina 13y agoThese were the exact points raised at #lisp. They also tried to explain the CL idiom to a recursive problem which I don't really recall except the fact that I didn't understand it...
- deleted 13y ago[deleted]
- lispm 13y agoPractical Common Lisp is great. ANSI CL by PG is so so. For example PG explains CLOS without examples - instead he implements his own object-system. That's WRONG in a book about ANSI Common Lisp, but PG never liked CLOS anyway. CLOS plays an important part in many CL based software libraries. PG's book provides nothing more like an expanded dictionary for it and the pointless other object system can be forgotten instantly. PAIP is one of the best books about programming ever. Generally loops are preferred over recursion in CL - it is not Scheme. 'Piratebay' pays also for the Lisp authors and encourages them to write books? Wonderful, let us know how it works.