C++ Insights – See your source code with the eyes of a Compiler
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
C++ Insights – See your source code with the eyes of a Compiler
Unofficial Hacker News client; not affiliated with Y Combinator.
f1shy · · focus · HN ↗
Like: I wish what is the first interpretation of my code to be obvious. Is not about advanced optimization, or nitty gritty compiler tricks, is about the language. This tool is useful in any C++ compiler. How did we end with such a complex language?
I mean (sorry, very personal take) the programming language is for me a tool to help me think about a problem and its solution. In this era of LLM more than before, is not a tool to get the machine to do something, is a language for formalizing ideas, problems and solutions, like math. Should not be so obscure, that you need to be a lawyer to understand it, right? Or I am very much old and totally in the weeds with my ideas?
esikich · · focus · HN ↗
f1shy · · focus · HN ↗
Compilation per se is not difficult. Doing it with good error recovery, good feedback in case of error, and the optimization is difficult.
This tool does not tell me those parts (for that is gotbolt) this is about how the first layer of interpretation works, and not for making compilers, but for understanding what the code actually means, because is not obvious at first sight.
dasyatidprime · · focus · HN ↗
pjmlp · · focus · HN ↗
Only if you mean K&R C or the early C89/90 compilers, before the extension explosion, newer language standards, and modern ISAs.