• 0 Posts
  • 40 Comments
Joined 1 year ago
cake
Cake day: July 10th, 2024

help-circle












  • Zacryon@feddit.orgtolinuxmemes@lemmy.worldthe perfect browser
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    4 months ago

    Nobody tests their shit well enough nowadays!

    I think there is indeed a lack of commitment. Thanks to capitalism and therefore production deadlines. Well, given, you can’t always catch “all” potential bugs, not just memory related issues. That’s sometimes not even theoretically possible. But it’s no secret how software quality increases by testing it thouroughly. And a lot of the time I just don’t see that happening. I’ve worked at institutions where software tests were done by answering the question “does it compile and run?”. And I’ve experienced systematic tests with specialized test engineers, who still had to cut short a lot of the time. But to assume that software is always tested well enough is in my experience naive.

    Read all your other comments man!

    This is not helpful. If you have critique, be more specific. I know what I’ve written.

    I am always open to discussion and changing my views if I see convincing arguments, as I did at another place here. Your lack of patience and quick judgement of my character is not my fault, but yours. I was discussing the issues here neutrally with you so far.

    However, this topic is done for me anyway, as the discussions here did indeed change my view regarding memory safety in C++.



  • The definition of “a memory safe programming language” is not in debate at all in the programming community.

    Yes, my mistake. I’m sorry.

    This is incredibly arrogant, and, tbh, ignorant.

    You’ve willingly ignored the remaining part of that context, where I explicitly admitted problems in common usage. It was not my intention to come across as arrogant.

    there is no language construct in place to protect from these trivial memory safety issues

    Depending on what you mean by “language constructs”: there are, e.g. RAII or smart pointers. But they aren’t enforced. So it’s correct to say that C++ is inherently memory unsafe due to the lack of such enforcements. The discussions here changed my opinion about that.



  • You’ve missed the context. There are occasions in Rust where you have to use more boilerplate code which you wouldn’t have to implement in C++ to that extent.

    But saying that C++ is free of boilerplate is of course ridiculous, if you are not able to heavily leverage templates, CRTPs, macros and alike.



  • No. I changed my mind just very recently throughout this discussion.

    I agree now that the lack of enforcement of memory safe techniques in C++ makes it inherently memory-unsafe.

    That doesn’t change the fact though that it’s possible to write memory safe code, if you know what you’re doing, use the right patterns, classes etc…