• ck_
    link
    fedilink
    arrow-up
    2
    ·
    10 months ago

    Tests are supposed to ensure functionality, not implementation. No useful unit test has ever been made obsolete by a type system. Likewise, if your tests claim your program fulfills its functionality, the type system ads no additional information to the discussion.

    • Double_A
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      10 months ago

      My point was that without a type system you need an impossible 100% code coverage, to be sure that you didn’t accidentally mess up some variable assignment or parameter somewhere, since you have nothings to easily and automatically catch those errors.

      • ck_
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        10 months ago

        I understand your point, I just choose to reject it for the reasons given.

        • Double_A
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          I think we are actually saying the same thing though…? Tests should really only ensure functionality. It should be the language’s job to help you with obvious implementation errors (such as using a wrong value type).