Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by __alexander on Tuesday April 22, 2025 @06:36AM
(#43760685)
Crafting Interpreters has been sitting on my shelf for two or so years. I would love to read the book but the use of Java shelved it. I don’t have the time to understand the concepts from the book while simultaneously learning Java.
[ Parent
| on HN ]
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by vips7L on Tuesday April 22, 2025 @09:13AM
(#43761702)
Bob uses basic programming constructs. If you know any language you can follow the book.
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by __alexander on Tuesday April 22, 2025 @10:07AM
(#43762365)
Yes, but half the code in the book is implemented in Java.
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by blenderob on Tuesday April 22, 2025 @11:19AM
(#43763237)
You can use Python or anything else you like to implement your code. The Java code he writes is simple, imperative code. But the OOP stuff might get in the way. If you've got programming experience, it isn't hard to read it and write your own in your preferred language.
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by markus_zhang on Tuesday April 22, 2025 @11:44PM
(#43768451)
Or you can simply jump to the second part in C. I don't think it's mandatory to read the first part for the second one. Plus the second part is more interesting as it implements a VM.
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by __alexander on Wednesday April 23, 2025 @02:36PM
(#43775284)
Oh, that is good to know. Thanks.
Re:Ask HN: Writing an Interpreter in Go or Crafting Interpre...
by FusspawnUK on Thursday April 24, 2025 @09:06AM
(#43782244)
Its easy to follow along with, I did my implementation in c#, Likely even easier now you can just feed the java to chat gpt and have it translate to <insert favourite language here>.