The Little Schemer by DanielFriedman, MatthiasFelleisen and DuaneBibby (illustrator)
Publisher: The MIT Press; 4th edition (December 21, 1995) ISBN 978-0262560993 , ISBN 0262560992 http://www.ccs.neu.edu/home/matthias/BTLS/index.htmlThis delightful book leads you through the basic elements of programming in SchemeLanguage (a LispLanguage dialect) via a series of dialogues with well-chosen questions and exercises.
The title is quite often abbreviated as 'TLS'. The previous editions were entitled TheLittleLisper. It now has several companions:
I didn't like this book. I didn't find the layout intuitive nor did I find the examples simple and easy to grasp. The style of the book is so novel that I found it distracting.
I liked this book and thought the layout was intuitive, although its two column format uses 200 pages to explain what could have been explained in 20 pages without sacrificing anything. But even after reading it and then trying to read and write some 'real world' scheme code much was still Greek to me. For instance, it ignores vectors and pairs completely and only teaches you how to loop through recursion. Heh. Looping is done with (tail) recursion in Scheme.
GuileScheme at least has other constructs such as while loops... Yup, and they'll be macros that transform to tail recursive functions
ThingsYouDidntKnowYouKnew?: if you had never programmed a computer before and you learned Scheme from the TheLittleSchemer you'd never be worried that it lacked loops because nothing mentions stack frames and you wouldn't have the expectation that function calls took stack space. Only coming from an imperative programming background (which is most of us) would one be worried about using TailRecursion to loop. Its a case of having to introduce an extra concept to explain something because of extra (and superfluous) knowledge the student already possesses.
Except that you forget to mention that tail-call optimization is used to eliminate stack consumption. If this is the "extra concept" that you describe above, I simply and utterly fail to see how describing one concept (tail-call optimization) is in any way harder than describing three (while loops, for loops, and if your language has them, until loops). And, I have to concur: I hated The Little _____ series. StructureAndInterpretationOfComputerPrograms is, I think, a vastly superior book.
I greatly enjoyed TLS. It starts off with some recursion practice and quickly gets up to some advanced CS topics (continuation-passing, the Y-combinator, even the halting problem) while maintaining an air of levity and making it all feel like a game. But the style may be a barrier for some: it's just questions and answers, many of which are purposefully silly, and a few of which are just tips on good style. Terms are also (purposefully) used before they're defined, if they're defined at all, so that you are forced to learn from context. For me, this equates to learning faster, and not getting bored. It may be too offbeat for some. So my advice is to find a preview and read the first couple of pages. You'll either love or hate it, or maybe you'll be hungry. Also, be warned that it's not very "practical." The specific tasks they do work on are only designed to get you thinking about functional programming; you wouldn't do them the way TLS does in real code. In summary: not a cook book, and not a reference book. More like a set of brain twisters, and it turned out to be just what I was looking for.
BrianMarick's A Little Ruby, A Lot of Objects (http://www.visibleworkings.com/little-ruby/) teaches some RubyLanguage in the 2-column manner of The Little Lisper/Schemer. It especially helps the reader to understand metaclasses. Like Schemer, the book is somewhat food-centric. Marick seems to have abandoned work on it after chapter 3. Oh well. It's pretty interesting nevertheless.
I started out doing the exercises in this book, but I found that I'd surpassed it halfway through because I started doing programming puzzles in ClojureLanguage somewhere in the middle. After that, the slow, step-by-step approach of this book felt plodding and dull. --bh
CategoryBook LearningProgrammingLanguages CuteBooks CategoryFoodAndDrink