3 ms·
And runtime exceptions? What about them?
by fooster 11y ago
And runtime exceptions? What about them?
- jacques_chester 11y agoThey leave you in about the same position as a programmer in a dynamic language. The advantage of runtime exceptions over Go is that I will get a fatal crash and a stacktrace. I don't have computation proceeding in an undefined, difficult-to-debug way because I forgot to do `err != nil` somewhere (particularly for functions that only return err).
- fooster 11y agoOr someone will catch it and discard the result which is often often what occurs. For example, with java throw an exception in an executor task (an assertion failure for example). What do you think occurs?
- jacques_chester 11y agoWhich happens in Go too. I've seen a lot of code that happily sails past functions which only return err, meaning the compiler never pipes up. Don't get me wrong, though. I become grumpy when I see empty catch clauses. Or a logger figleaf.