I don’t really know if this even falls under brainstorming, it was just a silly thought that came to mind, and I was curious if it exists/has any usability at all.
So, the lowest level of speaking to the machine that one can interact with is assembly/machine code. People then construct languages that abstract this away so that, by means of a compiler, the actual logic of the code can be encoded into multiple assembly language outputs.
In doing so, however, these higher-order constructs must be made concrete. E.g., if you have an “enum”, that has to become some data in either a register or in memory that can be updated.
So, I know in Zig you can specify the underlying type (e.g. enum (u8), if I recall), but, say one didn’t, when one compiles, could the output include what the concrete “type”(?) was set to? Would such a thing make understanding the state of memory better/easier without having to look at the full assembly output generated?
I use enum as the example as it’s what came to mind most readily, but hopefully my abstract proposition/question is somewhat clear.
To attempt another example, considering C, you write “int v = 30”, that the compile step would have in its output the concrete choice of “u8” or something.