6 ms·
Show HN: Build your own programming language in your own language. Why on earth would someone seriously want to use C++ for the compiler, when you created a mu
by rurban 6y ago
Show HN: Build your own programming language in your own language.
Why on earth would someone seriously want to use C++ for the compiler, when you created a much better language? Bootstrap it once and your problems are gone. Memory safety, tree management, proper matching, high level. All extremely important for a compiler.
- dmytrish 6y agoOne reason could be that most real-world compiler/runtime codebases are in C++ (gcc, llvm/clang, v8, most of Java JITs) and C++ has just enough high-level features to make a large code base somewhat manageable. So, if one wants to work on a industrial-strength compiler at some point, it might be not the most expressive and helpful choice, but it makes sense.