> In the real world the code needs to compile first, of course, then run
This is not true in my experience as a professional. I write pseudocode all the time. Often the fastest way to evaluate architecture choices is to sketch out your architecture, sketch the consumers of your proposed API, and see what issues come up.
Making this kind of code compile is a waste of time. Reading code without the computer is a crucial skill.
Graders require compiling code because it's easier to grade.
This is not true in my experience as a professional. I write pseudocode all the time. Often the fastest way to evaluate architecture choices is to sketch out your architecture, sketch the consumers of your proposed API, and see what issues come up.
Making this kind of code compile is a waste of time. Reading code without the computer is a crucial skill.
Graders require compiling code because it's easier to grade.