• peoplebeproblems@midwest.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 days ago

        Oh that’s neat. That makes me feel a lot better. I mean I get that the systems were probably embedded and that everything was defined, but it’s relieving to hear that a segmentation fault or dangling pointer would generally be avoided.

    • palordrolap@fedia.io
      link
      fedilink
      arrow-up
      8
      ·
      5 days ago

      Ada is a language that leaves a lot of things “implementation dependent” as it’s not supposed to grant easy access to underlying data types like those you’ll find in C, or literally on the silicon. You’re supposed to be able to declare your own integer type of any size and the compiler is supposed to figure it out. If it chooses to use a native data type, then so be it.

      This doesn’t guarantee the correctness of the compiler nor the programmer who absolutely has to work with native types because it’s an embedded system though.

      This has ended in disaster at least once: https://itsfoss.com/a-floating-point-error-that-caused-a-damage-worth-half-a-billion/