by bmn__ · 3y ago · 0 comments
Thinking otherwise just leads to suffering. The problem with tutorials like Tiny Compiler or Crafting Interpreters is that the authors do not run into problems with the code shown in their teaching materials, but as soon as a student wants to apply it to modestly complex grammars, it stops working. The authors traded conciseness for correctness which IMO is a bad trade-off, especially since a reasonably complete implementation of a parsing algorithm that has no shortcomings is perhaps only four to six times longer than a short and flawed one.
The point of this critique is to raise awareness; each student should not have to figure out that they got the bad end of said trade-off by trial and error, instead the teaching material should make this clear initially.
>> never
> nope you are wrong. I never tokenise everything up front
Explain how you could possibly arrive at the complete opposite meaning of what I wrote when you even use the same word "never" as I did?
Quick, get another downvote in, that'll teach me! Peak HN moment here.
I upvoted your correction.