
Algorithms + data structures=programs
by Niklaus Wirth · first published 1976
81mentions
35recommended by
59HN commenters
2007–2026first – last mentioned
59% recommend41% neutral
Why HN recommends it
Compact, practical treatment of core algorithms and data structures such as hash tables and recursion, plus a short compiler chapter built around PL/0. Suits beginners and working programmers who can get past Pascal.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…edited? Or maybe I really do just need to suck it up and read these books. I know it's not the same exact book but I took his style to be to generate encyclopedic tomes rather than interesting reading. > Algorithms + Data structures = Programs Oo a Wirth book. Those are always good. > I know you said no to the little schemer but you technically didn't mention The Reasoned Schemer Man you're cutting it close there!
on “Ask HN: Most interesting, mildly impractical, well-written books on software?” ↗Lua, but I'm sure there are many more. The generate-as-you-go technique is best described in Wirth's Algorithms + Data Structures = Programs, first edition (the last chapter about compilers was removed in later editions for some reason). Turbo Pascal - probably the smallest and the fastest commercial compiler ever made - well, for an imperative…
on “Why Lisp? 3 answers” ↗…to tutorialize such a task. To complement the JS stuff, a general outline book. I like Schaum's Outline of Principles of Computer Science. Then all the "big hits": The Art of Computer Programming Algorithms + Data Structures = Programs The C Programming Language The Little Schemer, Structure and Interpretation of Computer Programs, and Common Lisp the Language. Starting Forth, Thinking Forth, and the Forth-83 standard Smalltalk-80…
on “Ask HN: Advice for a prisoner learning to program” ↗…seconding Downey's Think Python (which has appeared in several versions with different titles). It is an easy read but is a bit deeper than many introduction to Python books. Also seconding Wirth's Algorithms + Data Structures = Programs but it requires a lot more concentration and study than the previous suggestions. It is also old-fashioned, from the late 1970s I think, uses Pascal as its programming language. It teaches and celebrates…
on “Ask HN: I'm looking for a good book on the fundamentals of CS” ↗For me the biggest change was 'structured programming', Niklaus Wirth and K&R changed the way I looked at code completely. Pascal was never my favorite language but after 'Algorithms + Data Structures = Programs' I became a much better programmer pretty much overnight.
on “Rich Hickey's Greatest Hits” ↗…I write because it's fun to do it all over again later. [0] I think my oldest is "Compiler Construction for Digital Computers" by David Gries. My favorite isn't really a compiler book, it's Wirth's "Algorithms + Data Structures = Programs" because he implements PL/0. I used to have some PDFs by Thomas Christopher that used matrices to computer first, follow, etc sets that I thought was interesting, but have since lost those.
on “Ask HN: Have you created a programming language and why?” ↗…it is possible to implement Abstract Data Types application architectures, which any good software engineer can easily tackle. And for those that aspire to reach that level, here are a few examples. "Algorithms + Data Structures = Programs" by Niklaus Wirth, 1st edition is Modula-2, the 2nd in Oberon "Introduction to Algorithms" by Thomas Cormen, Clifford Stein, Ronald Rivest, Charles Leiserson "Abstract data types and Modula-2: a worked…
on “Stop using strncpy already (2013)” ↗Niklaus Wirth's, "Algorithms + Data Structures = Programs", is also a great read for the last chapter, "Language Structures and Compilers", which is a nice succinct read. It provides a little more formalism than Crafting Interpreters and it's introduction of…
on “Crafting Interpreters: Closures” ↗> Should I Switch From Turbo Pascal to Turbo Modula-2? The million dollar question. More seriously, I love Pascal and similar. My first two books were Algorithms + Data Structures = Programs (Pascal) and Algorithms and Data Structures (Modula 2), both by Nicklaus Wirth.
on “If only Borland had stuck with Turbo Modula-2 for CP/M (2013)” ↗…learnt about / explored the design space, will be able to prompt more pointedly and evaluate the output qualitatively. > sometimes a barrier to getting started for me Plenty great books on the topic (: Algorithms + Data Structures = Programs (1976), https://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures...
on “Rob Pike's 5 Rules of Programming” ↗…but I'd leave it for a while.) You should read the "Schemer" series (Little, Seasoned, Reasoned) -- again, lots of Scheme, but wonderful if somewhat idiosyncratic reads. Going back in time, Wirth's "Algorithms + Data Structures = Programs" is a classic in the field, and a pleasure to read. CLRS' "Intro. to Algorithms" is a foundational text on algorithm analysis and design, though you might also want to try some of the more popular treatments…
on “Book recommendation to learn basics of Comp Sci?” ↗I suggest you read "Algorithms + Data Structures = Programs" by Niklaus Wirth. http://tinyurl.com/yw7tgo
on “Ask YC: Data structure or Algorithm selection for a problem?” ↗Over the years I've found the following CS books helpful, but only a minority in my day-to-day work. Your mileage may vary, as would the utility of these to you. Algorithms -> Algorithms + Data Structures = Programs by Wirth (worth its weight in gold if you can get past the Pascal syntax) OS -> Operating System Concepts by Silberschatz et al (The dinosaur book) CS Theory -> Introduction to Automata Theory,…
on “Must Read CS Books For Self Self-Taught Programmers” ↗While I did not learn programming this way [1], I highly recommend the following book to beginners of programming: "Algorithms + Data Structures = Programs" by Niklaus Wirth: http://www.amazon.com/Algorithms-Structures-Prentice-Hall-Au... While example programs are in Pascal programming language (that the author created), it is still a very well written…
on “Ask HN: How did you learn to code?” ↗Wirth's work was tremendously valuable to me. His book "Algorithms + Data Structures = Programs" shaped the way I approached programming, and the Pascal language (in its various Borland incarnations since Turbo Pascal 1.0 until Delphi) was my primary tool for many years.
on “Celebrating Niklaus Wirth's 80th Birthday” ↗