Here's a situation that came up recently in chat, and I realised I'm not sure what our rules are.
A few challenges require code to run without crashing/erroring. As such, a runtime error would make the answer ineligible. For example, here's a requirement from the "add a language to a polyglot" challenge (the original context, but I'm interested in a general answer):
- Your program must run without erroring out or crashing. Warnings (and other stderr output) are acceptable, but the program must exit normally (e.g. by running off the end of the program, or via a command such as exit that performs normal program termination).
Something that challenges typically don't consider is as to what happens if the compiler crashes. We recently discovered that in Thutu, it's possible to write code that crashes the compiler, but because the compiler writes output as it's running, when it crashes, partially complete output is left in the output file — and it's possible to crash the compiler in such a way that that output is a program that runs without error.
There's something of a philosophical problem here; we normally think in terms of languages as defined by a particular implementation, but in this case, the implementation doesn't really give an opinion, as steps "outside" the compiler itself are relevant. In particular, do we consider the compile technique as
compile; run (i.e. attempt to run regardless of what happens in the compile), or
compile && run (i.e. run only if the program compiled successfully)?
So my question is, in this sort of situation, does a program that crashes the compiler, but has executable resulting output, count as running without error?