Comment by astrange
9 months ago
Arbitrary recovery to null pointers isn't a good way to do robust programming. I recommend doing the exact opposite actually.
https://en.wikipedia.org/wiki/Crash-only_software
https://medium.com/@vamsimokari/erlang-let-it-crash-philosop...
A crash of an actor in BEAM is incomparable to a crash of a video game.
Is it? Is there no reasonable case where you have a subsystem in a game crash, then restart itself? Unless I'm mistaken, I've experienced this myself in video games more than once. Anything beats a full crash with a pointless error message.
I feel like a lot of people of HN think making a game is like making a web service or a GUI application. Yes, this behavior is used in video games sometimes, "restart itself" often means reloading a save file or something similar.
But if your video game uses a DSL for actors then you can do it in the DSL, which avoids special arbitrary bug-hiding behavior.
I dare you to board a plane whose software was written that way.