Description
In my experiments in programming Rust, I've noticed that the panic! macro seems to generate an instruction called ud2 on x86-64 -- an instruction that is intentionally invalid. Doing this, I presume, is to intentionally raise a SIGILL and crash the program, a practice I have not seen in any other systems programming language. This should likely be for the same reason that no one terminates a process by intentionally dereferencing a null pointer -- the OS has more graceful ways of stopping it, and nobody wants to add "segmentation fault" or "illegal instruction" (or similar output messages depending on the OS) to their program's output. On Windows, this becomes particularly annoying, as running into either of these errors will cause a window to appear for a few seconds informing the user that the program has stopped working.
Would it be unreasonable to simply print the appropriate error message and call std::process::exit()?