Login
You're viewing the f.duriansoftware.com public feed.
  • Jun 9, 2026, 7:06 PM

    The only part of thrown errors I dislike is that they are implicit control flow. There are times when I'm in the middle of some code which needs to complete in its entirety or clean up something (a mutex, some sequence of file system changes, meddling with a linked list, whatever) and it's nice to know whether a function call will implicitly return from my function or not.

    1/2

    💬 1🔄 1⭐ 0

Replies

  • Jun 9, 2026, 7:06 PM

    But I think this can be solved perfectly well on a fairly shallow syntax/type level: tag a function as "throws" if it can throw, have special syntax to call "throws" functions. Maybe you have to put a question mark after the function call expression for example. I don't think you gain *that* much from other error handling mechanisms if you do this

    2/2

    💬 0🔄 2⭐ 0