• @sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    English
    21 year ago

    Optional typing is pretty useful, especially if the tooling is such that it catches most issues. I use Python’s optional typing quite a bit, and my general approach is to add types if the function is intended to be reused or if it took more than three seconds to figure out what it does. We also use Typescript, and typing isn’t necessary there either.

    If your type system is too strict, it can be really annoying to work with and make simple things take longer. If it’s too loose, you’ll introduce stupid bugs.

    • @basskitten@programming.dev
      link
      fedilink
      English
      11 year ago

      If your type system is too strict, it can be really annoying to work with and make simple things take longer.

      Swift has entered the chat.