RE: Complicated AST manipulation looks ugly in C++. How to refactor it?
January 27, 2022 at 2:16 pm
(January 27, 2022 at 8:36 am)FlatAssembler Wrote:(January 25, 2022 at 8:12 pm)Jehanne Wrote: Why anyone would write a complier in C++ is beyond me; in my opinion, C would be a much better choice.
C is not good at doing high-level stuff. C++ is good at both high-level and low-level stuff.
Isn't that the whole point of a compiler, to translate computer code into machine code? I would ditch the C++ and just use C, modeling your new language on an existing one. C#, after all, "borrowed" heavily from Java.