4 ms·
Here'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 ou
by fauigerzigerk 11y ago
Here'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...