4 ms·
Then it shouldn't have added exceptions in the first place. But exceptions in go exist and so does exception (un)safety, and denial only leads to buggy code. I
by usrnm 2y ago
Then it shouldn't have added exceptions in the first place. But exceptions in go exist and so does exception (un)safety, and denial only leads to buggy code. I cannot count how many times I've seen exception unsafe code in go exactly because everyone keeps ignoring them
- randomdata 2y agoWhat would you use when you actually have an exception, then? Exception and exception handlers are a useful construct, but, like everything else, become problematic when used outside of their intended purpose. Just because exception and error both start with the letter "e" does not mean they are in any way related. They have very different meanings and purposes.
- usrnm 2y agoIf they are really exceptional situations that should never happen, just crash the process. The moment recover was added they become just another error handling mechanism
- randomdata 2y agoYou would crash the process. But, sometimes it's useful to do a little bookkeeping first.
- usrnm 2y agoThat's not how recover is used in practice
- randomdata 2y agoRight. In practice, people don't even realize that Go has an exception handling system (see rest of thread) to use.