• Scrath@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    Can you give some examples of what you consider to be the issues?

    My professor said that C++ embedded compilers used to be very buggy but have matured quite a lot as of ~10 years ago while C was stable a lot longer.

    Another thing I could think of is the language complexity causing higher resource usage, e.g. by including large libraries though I’m not sure about that since most of the unused stuff should theoretically get optimized out.

    I guess if you don’t know roughly how the internals of some C++ data types work it could cause you to accidentally use dynamic memory allocation when using strings or vectors.

    On the other side, C++ style casts provide more safety as compared to C style casts and allows for usage of references instead of raw pointers to make the code generally safer.