Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Fed-up with strongly typing

Fed-up with strongly typing

Scheduled Pinned Locked Moved The Lounge
comhardwarequestion
61 Posts 29 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jschell

    BobJanova wrote:

    The C# compiler, and any other compiler for a strongly- and statically-typed language, certainly will check the data type of variables through every possible code path

    Neither C# or any other compiler in that category will check dynamically loaded code paths. Where as unit testing would check that.

    D Offline
    D Offline
    descenterace
    wrote on last edited by
    #61

    Unit testing will check the set of code paths that you write the tests to exercise. Fine if you're testing small methods, with only a few possible code paths or edge cases. Then you need to test interactions between your classes, each of which has a dozen methods with 2-5 paths each. Suddenly you have tens of thousands of tests, most of which differ in very small ways. A strong type system enables invariants to be proven efficiently, regardless of the number of possible paths through the code, because it does not need to rely on executing every possible path. A type system is not a replacement for unit tests, and unit tests are not a replacement for a type system.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups