5 ms·
> or you rely on some sort of code generation approach. Exactly.
by jshen 11y ago
> or you rely on some sort of code generation approach.
Exactly.
- fauigerzigerk 11y agoHere's an idea: How about a code generator that interprets special syntax we put into source files? The code generator would run before every compile and its output would be fed straight into the compiler. An apt name might be CPP -- compile preprocessor. It might be a bit difficult to predict what the input to the compiler actually looks like after CPP has done its job. So we could restrict the kinds of things that CPP can do to make it more predictable. Let's say CPP can only substitute symbols in places where types are asked for...