Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
Translation: I am a fucking retard that can't understand the value of automating the release of resources (memory, file handles, mutexes, etc) when exiting scope.

Translation: I am the actual fucking retard that doesn't understand that resources don't need to be acquired and released 1,000 times every second, slowing down my entire fucking program by a factor of 10, just because I am too much of an ignorant faggot to learn how to manage memory in non-idiotic ways such as not releasing it every single fucking time scope changes
 
Translation: I am the actual fucking retard that doesn't understand that resources don't need to be acquired and released 1,000 times every second, slowing down my entire fucking program by a factor of 10, just because I am too much of an ignorant faggot to learn how to manage memory in non-idiotic ways such as not releasing it every single fucking time scope changes
The performance problem you are describing has more to do with program structure than anything RAII specific.
 
Translation: I am the actual fucking retard that doesn't understand that resources don't need to be acquired and released 1,000 times every second, slowing down my entire fucking program by a factor of 10, just because I am too much of an ignorant faggot to learn how to manage memory in non-idiotic ways such as not releasing it every single fucking time scope changes
Bro watched one Muratori video on RAII and thinks that RAII = smart pointers.
 
Translation: I am the actual fucking retard that doesn't understand that resources don't need to be acquired and released 1,000 times every second, slowing down my entire fucking program by a factor of 10, just because I am too much of an ignorant faggot to learn how to manage memory in non-idiotic ways such as not releasing it every single fucking time scope changes
So pull the resource acquisition up the levels until its outside of the hot loop? You can pass ressources into functions, you know?
 
Jesus fucking christ. unless any of you codemonkeys and skids have created the type of software I've created from scratch, shut the actual fuck up. I've reverse engineered mobile apps, hacked video games, built a phone farm that I could remotely control from a central hub and inject commands into hundreds of devices with a single click. You fuckers have used javascript frameworks. Shut. the. fuck. up.
The fuck did you say to me you little bitch? I'll have you know I'm trained in gorilla programming and have over 300 confirmed hacks...

lmao, no RAII
Translation: I am deeply afraid of memory, so never learned how to manage it
Translation: I am deeply afraid of assembly, but I want to pretend that I am better than everyone else, so I'm going to pretend that C is low level

RAII is memory management; C++ automatically calling certian functions for you is a convenience to make things less tedious, just as C handles function calls and the stack, or how malloc/free actually do the hard work for you. There is a great benefit to reducing the amount of noise that the programmer has to deal with. Just becuase some people don't know how to use a tool effectively, that doesn't mean that the tool is inherently bad.
 
I wonder if when you guys cook pasta, if you cook a single piece at a time. Or when you go to wash your hair, if you turn on the water, shampoo a single hair follicle, turn off the water, dry off, then take another shower for every single strand of hair you have. Because this is essentially what RAII is doing under the hood, always, whether you want it to or not.

It's fucking mind blowing that we even have to have this discussion in 2026, but here we are. An entire fucking ecosystem of software being bogged down at every single step of execution just because some dickface refuses to close a file handle.
 
It's fucking mind blowing that we even have to have this discussion in 2026, but here we are. An entire fucking ecosystem of software being bogged down at every single step of execution just because some dickface refuses to close a file handle.
There is no discussing it with you because you are fundamentally misunderstanding what RAII is about.

I wonder if when you guys cook pasta, if you cook a single piece at a time. Or when you go to wash your hair, if you turn on the water, shampoo a single hair follicle, turn off the water, dry off, then take another shower for every single strand of hair you have. Because this is essentially what RAII is doing under the hood, always, whether you want it to or not.
What is bro yapping about.

RAII is memory management
That's simplifcation that's probably a reason why RAII have such a bad rep. RAII is not about memory, it's about resources which are much more abstract.
Containers still uses RAII to construct/destruct objects, but you don't have to allocate memory a lot of the times.
Moreover you can easily compose classes which should uphold their invariants thanks to ctors and release everything thanks to dtors after just object of top class is destroyed. All without having to manually keep track of what's need to be initialized and what's need to freed.
RAII is absolutely killer feature of C++, and reason why it keeps dominating in certain industries.
 
Back
Top Bottom