• Schadrach@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    8
    ·
    4 days ago

    By that logic what we really need is a modernization of Ada, where there are no compiler warnings and anything that would generate one in another language is instead a compiler error, everything is strongly typed, etc, etc.

    If you aren’t familiar with Ada, just imagine Pascal went to military school.

    • dejected_warp_core@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      4 days ago

      Pascal went to military school.

      I’m not in love with the idea, but a language that cuts out the BS has a sudden appeal when on a group/team project.

      • Schadrach@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        9
        ·
        4 days ago

        That analogy was chosen for a reason. Ada was originally developed by DOD committee and a French programming team to be a programming language for Defense projects between 1977 and 1983 that they were still using at least into the early 2000s. It’s based on Pascal.

        It was intended for applications where reliability was the highest priority (above things like performance or ease of use) and one of the consequences of that is that there are no warnings - only compiler errors, and a lot of common bad practices that will be allowed to fly or maybe at worst generate a warning in other languages will themselves generate compiler errors. Do it right or don’t bother trying. No implicit typecasting, even something like 1 + 0.5 where it’s obvious what is intended is a compiler error because you are trying to add an integer to a real without explicitly converting either - you’re in extremely strongly-typed country here.

        Libraries are split across two files, one is essentially the interfaces for the library and the other is it’s implementation (not that weird, and not that different than C/C++ header files though the code looks closer to Pascal interface and implementation sections put in separate files). The intent at the time being that different teams or different subcontractors might be building each module and by establishing a fixed interface up front and spelling out in great detail in documentation what each piece of that interface is supposed to do the actual implementation could be done separately and hypothetically have a predictable result.