Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 3, 2025, 10:07 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Complicated AST manipulation looks ugly in C++. How to refactor it?
#12
RE: Complicated AST manipulation looks ugly in C++. How to refactor it?
(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.
Reply



Messages In This Thread
RE: Complicated AST manipulation looks ugly in C++. How to refactor it? - by Jehanne - January 27, 2022 at 2:16 pm



Users browsing this thread: 1 Guest(s)