develwoutacause’s avatardevelwoutacause’s Twitter Archive—№ 770

    1. Try catch is awful. This thread talks a lot about the performance implications, but even syntactically it's weird. How often do you do: string? str = null; try { str = trySomething(); } catch { str = somethingElse(); } Scoping is awkward and the type includes null. @badamczewski01/1427248857197514754
  1. …in reply to @develwoutacause
    Also, in most languages there is no way to know what errors can be thrown by what functions, so you don't know what you need to handle. #Java has checked exceptions which no one uses, most other languages have no safety net or tools to make sure you are handling everything.
    1. …in reply to @develwoutacause
      My point is that while the performance is bad, it's just not a very convenient or helpful tool. #Golang and #Rust both embed this information in their types, making it much easier to reason about and utilize for common tasks.