• jqubed@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    As someone who has done no programming since taking C++ in high school more than 20 years ago, what do you mean by safer language?

    • brenticus@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      C and C++ require more manual management of memory, and their compilers are unable to let you know about a lot of cases where you’re managing memory improperly. This often causes bugs, memory leaks, and security issues.

      Safer languages manage the memory for you, or at least are able to track memory usage to ensure you don’t run into problems. Rust is the poster boy for this lately; if you’re writing code that has potential issues with memory management, the compiler will consider that an error unless you specifically mark that section of code as unsafe.