4 ms·
Yeah, I did the Nand2Tetris course which culminates in writing a toy compiler and the philosophy there is the same as yours. I really like that philosophy - as
by alexgmcm 7y ago
Yeah, I did the Nand2Tetris course which culminates in writing a toy compiler and the philosophy there is the same as yours.
I really like that philosophy - as Feynman said:
"What I cannot build I do not understand"
- tom_mellior 7y ago> "What I cannot build I do not understand" This is true, but it provides no guidance on the question whether you need to understand it. If you don't want to build a web browser, you don't need to understand how web browsers are built. That doesn't mean that it is dishonorable for you to use a web browser. So do you need to understand how generated parsers work? I think that's a matter of preference that Feynman doesn't help you decide.
- macintux 7y agoIf you’re designing a language, it’s not a stretch to assume that understanding how parsers work would be useful.
- tom_mellior 7y agoI think "you plug a grammar into a generator, and you get back a function that maps character sequences to a syntax tree" can be enough understanding for a lot of use cases. Maybe you're more interested in any of the many other aspects that go into designing and implementing an interpreted language -- type checking, garbage collection, an efficient bytecode format and interpreter for example. But maybe you aren't, in which case I agree that case a hand-written parser might be right up your alley! There's no one size fits all.
- greenshackle2 7y agoYou need a little bit more than that, cause if that is the limit of your understanding, you will have a bad time when the generator spits back an error message about reduce/reduce conflicts or whatever instead of a function.