What to do on engine failure is one of the first things they teach you after basic flight lessons. After that many instructors will even simulate surprise engine failure by cutting off the engine at random while the student is trying to learn about some other emergency situation. Engine failure is part of the check rides every pilot needs to pass to get a license.
When the engine stops working because it doesn't get enough fuel because there's nothing left in the tanks, the root cause is not putting enough fuel in the tanks, not engine failure.
Here https://news.ycombinator.com/item?id=29731719 it seems like you are essentially saying "engine failure is not too dangerous; one of the leading causes of death is running out of fuel".
I did not say running out of fuel should be formally classified as an engine failure. It was more that I supposed that the effect on the airworthiness of their airplane should be approximately the same whether the engine stops due to failure or running out of fuel. So that makes your comment appear contradictory. Hence my prompting for an explanation, I'm quite willing to believe I misunderstood something of your post or about aviation so I didn't intend for it to sound glib.
Sure, but now we’re talking about a situation where your engine has already failed… That’s very different.