So even if a panic happens in a subprocess the parent is killed? Why not allow the parent to handle restarting of the child? Maybe I misunderstand.
Expected errors such as network timeouts will use exceptions, and these have to be explicitly handled. For example, if you try to open a file that you don't have access to, an exception is raised.
I'm just thinking generally for production code you have a process supervisor daemon automatically restart when there are fatal errors (out-of memory errors for example). But in languages like erlang that support processes, one of the advantages is that you can support this mechanism through the process model. If I hit a divide by zero error in an edge-case branch of code, I will still want my process restarted no?
> So these are errors that should have been caught by the compiler but were not?
Some of them yes, others no. For example, the compiler can't statically guarantee that there are no divisions by zero. > If I hit a divide by zero error in an edge-case branch of code, I will still want my process restarted no?
Sure, and so Inko may at some point have a system for running "clean up" code of sorts, to report the error, etc. Actually restarting of things is something I prefer to have done by a system daemon, as there is no guarantee a program can continue after a panic (e.g. memory might be corrupted based on the nature of the panic).