Crafting Interpreters: Introduction

ยท

2 min read

I have been interested in how programming languages are designed and made. I had some false starts, or rather incomplete attempts. After some recommendations by some of my colleagues, I decided to use the book Crafting Interpreters by Robert Nystrom.

I am starting this series to document my journey through this book and also hold myself accountable through the journey. I hope I will see the end of the book and ultimately, properly understand how programming languages are designed. This book focuses on interpreted languages, thus I will be better at interpreted languages. One more reason for doing this is to better my Rust skills. I have been learning rust for the last 6 months and I noticed I need a lot of practice to get better at Rust. What other way to get better than to design programming languages ๐Ÿ˜… ๐Ÿ˜… ๐Ÿ˜….

The book implements two interpreters; the first one to show the concepts of programming language design and the second to show the implementation of the various facets of programming language design. For the second interpreter, the book already suggests using the C language, woo! pointers ๐Ÿ˜Ÿ๐Ÿ˜Ÿ. For the first interpreter, it is open to the language the reader will choose, so I choose ๐Ÿฅ๐Ÿฅ๐Ÿฅ... Rust. In the book, the suggested language name is Lox but it can be adapted to the name the reader chooses. For the language based on the c interpreter, I will call it clox and for the second one that has a rust interpreter I will call it rulox.

This will be an interesting journey, and as they say, a journey of a thousand words, begins with one article, ๐Ÿ˜๐Ÿ˜ I guess it is only me. Let us begin.