Welcome to the art of computer programming and to the new Raku language. This is one of the first books using Raku, a powerful, expressive, malleable, and highly extensible programming language. But this book is less about Raku, and more about learning how to write programs for computers.
This book is intended for beginners and does not require any prior programming knowledge, but it is my hope that even those of you with programming experience will benefit from reading it.
The Aim of this Book
The aim of this book is not primarily to teach Raku, but instead to teach the art of programming, using the Raku language. After having completed this book, you should hopefully be able to write programs to solve relatively difficult problems in Raku, but my main aim is to teach computer science, software programming, and problem-solving rather than solely to teach the Raku language itself.
This means that I will not cover every aspect of Raku, but only a (relatively large, but yet incomplete) subset of it. By no means is this book intended to be a reference on the language.
It is not possible to learn to program or to learn a new programming language by just reading a book; practicing is essential. This book contains a lot of exercises. You are strongly encouraged to make a real effort to do them. And, whether successful or not in solving the exercises, you should take a look at the solutions in the Appendix, as, very often, several solutions are suggested with further discussion on the subject and the issues involved. Sometimes, the solution section of the Appendix also introduces examples of topics that will be covered in the next chapter–and sometimes even things that are not covered elsewhere in the book. So, to get the most out of the book, I suggest you try to solve the exercises as well as review the solutions and attempt them.
There are more than one thousand code examples in this book; study them, make sure to understand them, and run them. When possible, try to change them and see what happens. You’re likely to learn a lot from this process.