Is memory safety in C++ really possible?

Is memory safety in C++ really possible?

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

Ape Out Shirt $21.68

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

  1. 4 weeks ago
    Anonymous

    >smart pointers
    >stl or custom containers that manage memory for you with RAII
    Wow so hard. Definitely need some borrow checker mommy to nag at me all day

    • 4 weeks ago
      Anonymous

      It's impossible to make C++ memory safe while still being basically a superset of C. The best you can do is , which is better than raw new/delete but still shit and does nothing to prevent invalid references when your data isn't being passed around as a shared pointer, which it almost never is.

    • 4 weeks ago
      Anonymous

      but also then need to never take iterators or references.
      would be nice to add static compiler check that this is the case.

      and then there are threads.

      • 4 weeks ago
        Anonymous

        or you could simply have high IQ and write an iterator that can handle this or simply use iterators as intended.

        • 4 weeks ago
          Anonymous

          c++ iterators are just like using pointers. they're not safe at all and prone to many kinds of errors

          • 4 weeks ago
            Anonymous

            you're a moronic Black person parrotting shit you saw on reddit and know nothing, it's possible to write an iterator for std::vector that doesn't break just because you added a new element

          • 4 weeks ago
            Anonymous

            then go on and do it, stupid apeman

          • 4 weeks ago
            Anonymous

            I already have, what's your point?

            >or you could simply have high IQ and write an iterator that can handle this or simply use iterators as intended.
            right, you could in fact write a smart iterator (safe iterator) that is notified to be marked invalid when ever the target container changes or dies

            similar for smart references

            of course that would make language much slower in many cases - but often that is ok.
            we could allow compiler to optimize it away in some instant-use cases (kind of like RVO) where compiler can prove it's sure no invalid access can happen in no runtime path

            also lambdas - as they reference variables (or make them use said safe-references)

            >marked invalid
            how about learn to program you moronic Black person, mark that it's invalid in your own head and then you won't need to be reminded that it is invalid

            no, i'm stating facts that c++ users acknowledge. i don't hide behind anonymity to spew bullshit like you ignoring reality

            ?t=295

            I don't care about standard library, I'm a white man, I wrote my own the way I needed it to work.

          • 4 weeks ago
            Anonymous

            >how about learn to program you moronic Black person, mark that it's invalid in your own head and then you won't need to be reminded that it is invalid
            KEK you stupid homosexual nocoder / smallcoder Black person, sometimes objects have srsly complex lifetime.
            >but I am a god who never makes any mistakes
            said every homosexual who went on and ooopsied in a vuln in his code

          • 4 weeks ago
            Anonymous

            I don't make mistakes nor overly complex lifetimes since I'm not mentally ill

          • 4 weeks ago
            Anonymous

            >I don't make mistakes nor overly complex lifetimes since I'm not mentally ill
            LOL. imagine working with this c**t.

          • 4 weeks ago
            Anonymous

            real work requires physical strength which is why you believe that clicking buttons on your keyboard is "working", since you get tired after typing for 5 minutes

          • 4 weeks ago
            Anonymous

            no, i'm stating facts that c++ users acknowledge. i don't hide behind anonymity to spew bullshit like you ignoring reality

            ?t=295

          • 4 weeks ago
            Anonymous

            Safercplusplus replaces them wholesale.

        • 4 weeks ago
          Anonymous

          >or you could simply have high IQ and write an iterator that can handle this or simply use iterators as intended.
          right, you could in fact write a smart iterator (safe iterator) that is notified to be marked invalid when ever the target container changes or dies

          similar for smart references

          of course that would make language much slower in many cases - but often that is ok.
          we could allow compiler to optimize it away in some instant-use cases (kind of like RVO) where compiler can prove it's sure no invalid access can happen in no runtime path

          also lambdas - as they reference variables (or make them use said safe-references)

  2. 4 weeks ago
    Anonymous

    C++ programmers don't care, they just move on and get the job done instead of wasting time.

    • 4 weeks ago
      Anonymous

      >preventing RCEs is a waste of time
      average C++ development

      • 4 weeks ago
        Anonymous

        There aren't any RCEs if you just don't make mistakes
        What are you, some kind of mistake-maker?

  3. 4 weeks ago
    Anonymous

    ???
    Modern C++ is focuses a lot on memory safety and safety in general.

    • 4 weeks ago
      Anonymous

      the guy seems to be such a rust gay he means memory safety only as in a borrow checker

      • 4 weeks ago
        Anonymous

        I wouldn't call him a Rustgay, but yeah, he's literally writing a borrow checker for C++.

        • 4 weeks ago
          Anonymous

          looks like a terminal case of troony derangement syndrome
          just use fricking rust at that point

  4. 4 weeks ago
    Anonymous

    Possible and easy when you're not moronic

  5. 4 weeks ago
    Anonymous

    C/C++ is only memory safe if your time has no value.

  6. 4 weeks ago
    Anonymous

    Hey guys I just wrote a bunch of Rust code with the unsafe keyword and now my code has fricking memory bugs. Holy shit Rust is such a piece of shit.

  7. 4 weeks ago
    Anonymous

    c++ is really ugly and shitty
    rust is really woke and pozzed
    i think we have to go with zig

  8. 4 weeks ago
    Anonymous

    they put in smart pointers, what else do you frickers want?

    either use the smart pointers, shut up, or transition into a rust troony.

  9. 4 weeks ago
    Anonymous

    Maybe people would care about Circle if you open-sourced it like they've been telling you for years, Sean.

    • 4 weeks ago
      Anonymous

      He is forever "I'm the only one working on this so plz sponsor me"

    • 4 weeks ago
      Anonymous

      >not free software
      why would I trust proprietary code to check something in a worse way than what I'd get if I simply used Rust?

  10. 4 weeks ago
    Anonymous

    Yes, just don't tell your computer to access invalid memory, how hard can it be?

  11. 4 weeks ago
    Anonymous

    If you want compile time guarantuees, the standard library backwards compatability has to die (at which point you can finally fix exceptions too). Unfortunately that means Bjarne has to die first.

Your email address will not be published. Required fields are marked *