• Bobby Turkalino@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    7
    ·
    13 hours ago

    You worked places with style guides? Did… Did you have a real testing environment that wasn’t prod too?

    Yes, and the style guides reached far beyond things like “use camel case”. I’m talking guidelines for how whole blocks of code should be formatted. Also weren’t allowed to throw exceptions at all even though we were using up-to-date modern C++. Some guidelines had good intentions and others were just put in by OCD control freaks that no one felt like opposing.

    And yes, we had a testing environment, although we mostly depended on manual QA rather than software tests. Medical devices can’t test in prod, fortunately

    • calcopiritus@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      11 hours ago

      There are many C++ features that make the language worse. Exceptions is one of them. It’s not strange to have them banned.

      Critical systems often only allow you to use a subset of the language. Dynamic (heap) allocations, recursive functions, exceptions are features that are often banned. In medical devices, safety is critical, so it makes sense. Otherwise you could get a Therac-like scenario due to an unhandled exception.