I want to learn programming.

I have knowledge of mathematical logic.

So, what I am searching is a book (or varios books) for learning to programming, but I think that a book like one which I imagine would be great. As I said, I have knowledge of mathematical logic, hence I have experience with formal languages.

So, I am searching a book where the theory of programing is developed, not a specific language, the theory of programing in a language in general, something like the foundations of programing or the theory of programing languages.

  • 1
    $\begingroup$ If you want to learn programming, I strongly suggest learning a programming language. Programming language theory has nothing to do with programming. $\endgroup$ Jul 2, 2021 at 7:44
  • $\begingroup$ Let me turn your question around: "Hi, I know how to implement compilers and I would like to learn mathematics (algebra, analysis, geometry). Which logic book should I read?" Do you see a problem? The theory of programming languages is not what you think it is. $\endgroup$ Jul 2, 2021 at 9:10
  • $\begingroup$ "Best book" is subjective and unanswerable. However, I do encourage you to read about programming language theory, at least eventually. It won't teach you how to program, but it will teach you how to program better once you've learned the basics. $\endgroup$ Jul 2, 2021 at 11:09

2 Answers 2


I don't know of a single book that covers what you want, but if you are genuinely new to programming but have a mathematical background, I think your first port of call should be:

SICP is out of print, but free online. This, I think, will teach you the basics of what you want to know in the way you want to learn it.

There are a lot of good books in the canon. I'm thinking of:

  • Stepanov & McJones, Elements of Programming.
  • Wirth, Algorithms + Data Structures = Programs.
  • Dahl, Dijkstra, & Hoare, Structured Programming.

And there are plenty more that go deeper into the theoretical side of programming languages, but they are probably more useful to those designing programming languages or compilers.

Regardless, all of these books assume that you know the basics first. So I would recommend working your way through SICP.


I recommend Conceptual Programming with Python because it was written by mathematicians and it will get you started on a number of topics quickly.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.