Re:Go Is a Well-Designed Language
by Cthulhu_ on Sunday January 12, 2025 @05:03AM
(#42672463)
I think this is an unneccesary absolute take. Panic is rarely used for error handling and nobody is advocating for its use in practice. I wouldn't use os.Exit() in deeper layers of code myself, it's better to have OS level startup / shutdown in a single / central location so that the other layers of a nontrivial application don't need to be aware of it. Having a recover block somewhere allows for graceful shutdown and logging, whereas using os.Exit() in random places would require you to write a utility function or repeat the shutdown / logging procedure.
[ Parent
| on HN ]
There are no comments on this comment yet.