u/Ok-Assistance-2480

How would you learn cpp if u had to develop a compiler from scratch today as a hobby project.

hello everyone, im posting to this subreddit, with a hope of help, im trying to learn cpp, but teh language is soo huge and a lot of it that i dont know whether it is important for compilers, i want to be a systems engineer, but i dont know how to learn, where to learn from, how much to learn, and also i would be extremely overwhelmed if anyone can give me an advice regarding systems and compilers and guide me through it please🙏

reddit.com
u/Ok-Assistance-2480 — 4 days ago

How would you learn compiler development from scratch if your goal was to build a real compiler?

I have become extremely fascinated with compiler development and want to eventually build a real compiler as a hobby project. My goal isn't just to follow a tutorial and copy code—I want to understand how compilers work at a deep level.

I've already started learning the prerequisites (computer organization, C++, data structures, etc.), but I'm looking for advice from people who have actually built compilers.

Some questions I have:

  • If you had to start over today, what learning path would you follow?
  • Which books would you consider essential?
  • Are there any projects or milestones that helped everything "click"?
  • Should I implement multiple small compilers before attempting a serious one?
  • Is it better to use tools like Flex/Bison at first, or hand-write the lexer and parser to understand the fundamentals?
  • How much compiler theory should I learn before I start building?

I'm looking for recommendations on books, papers, courses, blogs, repositories, or any other resources that helped you become proficient in compiler engineering.

I'd also appreciate hearing about mistakes you made while learning that you'd avoid if you were starting again.

Thank you, and yes this is all ai generated , I am sorry for this my English very bad i have to use ai

reddit.com
u/Ok-Assistance-2480 — 4 days ago