Python is memory safe? Can’t you access/address memory with C bindings?

  • Tobias Hunger@programming.dev
    link
    fedilink
    arrow-up
    9
    ·
    8 months ago

    That depends a lot on how you define “correct C”.

    It is harder to write rust code than C code that the compiler will accept. It is IMHO easier to write rust code than to write correct C code, in the sense it only uses well defined constructs defined in the C standard.

    The difference is that the rust compiler is much stricter, so you need to know a lot about details in the memory model, etc. to get your code past the compiler. In C you need the same knowledge to debug the program later.