
A little Java, a few patterns
by Matthias Felleisen · first published 1997
78% recommend22% neutral
Why HN recommends it
Teaches object-oriented design through a question-driven, example-heavy walkthrough of Java and common patterns. It serves as a bridge for those coming from functional thinking into OOP, and it is delightful to read.
Summarised by Claude from recommending comments
Matthias Felleisen and Daniel Friedman use a small subset of Java to introduce pattern-directed program design. With their usual clarity and flair, they gently guide readers through the fundamentals of object-oriented programming and pattern-based design. Readers new to programming, as well as those with some background, will enjoy their learning experience as they work their way through Felleisen and Friedman's lessons.
Affiliate links. As an Amazon Associate I earn from qualifying purchases.





A little Java, a few patterns, by Matthias Felleisen. Delightful book.
on “Quirky computing books” ↗I agree. It's the best book ever. Also see The Seasoned Schemer and The Reasoned Schemer. Similarly there is "A Little Java, A Few Patterns", that one teaches Java, and is written by the same authors. I was so excited about these books that I started writing "The Little C", it's gonna teach C the same way schemer books teach lisp! PS. I…
on “Deriving the Y Combinator” ↗…example, partial application, passing as arguments for abstraction) that you mention in Java, if a bit tedious (and often pointless, since the standard APIs generally weren't designed with that in mind.) _A Little Java, A Few Patterns_ came out in 1998; give it a read.
on “Yahoo Mail moving to React” ↗…It's more pragmatic and immediately useful than The Little/Seasoned Schemer, but this doesn't make it any less about FP. "Spessore" is about OOP, but described from unusual angle: it reminds me of "The Little Java, a Few Patterns" in this regard. It's a great description of how and why OOP works, from the most basic concepts up. Reg's articles on FP in JS and Ruby let me fill the gaps in my knowledge I had because of having no…
on “Functional Programming in JavaScript: A Collection of Hands-on Exercises” ↗For me best described in, and also as a topic mentioned in the paper about the visitor pattern connection, "A Little Java, A Few Patterns". This book writes really impractical Java, but in such a Scheme way, that you really can understand the deep connections between functional and object-oriented programming.
on “Deriving Dependently-Typed OOP from First Principles” ↗I don't think there's a centralized community for the Little Series. I think this is unfortunate. With a community, some great titles like The Little MLer (typed FP) and A Little Java, a Few Patterns (OOP) would be much better known. I found those two outstanding. I think A Little Java has been reprinted. But last time I checked, The Little MLer was bloody expensive. Standard ML, OCaml and F# need…
on “The Little Typer (2018)” ↗The book A Little Java, A Few Patterns by the same author and his colleague might answer your question.
on “Developing Developers (2015)” ↗there's actually a really good book that bridged it well for me when I was doing my bachelors, A Little Java, A Few Patterns. this is from the famous lisp books for groking FP.
on “Why senior developers fail to communicate their expertise” ↗I'm actually not surprised to see the counterfeit warning in the site. Last week I've ordered a book from Amazon Italy (A Little Java, A Few Patterns) only to receive what I do consider a very low quality copy of the book and somehow different edition despite having both the original and this "copy" same ISBNs: https://www.amazon.it/Little-Java-Few-Patterns/dp/0262561158…
on “The Art of Electronics (2015)” ↗Good examples of closures / first order functions in java is through a visitor; example below is like the ones in A Little Java, A Few Patterns new Top(new Anchovy(), new Top(new Tuna(), new Top(new Lettuce(), new Bot()))) .accept( new RemVisitor(new Anhovy() ); This removes those smelly Anchovies from your tuna sandwich -- and can be implemented…
on “Closures – A Simple Explanation (Using Ruby)” ↗