News for hackers. Stuff that matters.
Re:I disagree with Linus Torvalds about C++ (2009) by gpderetta on Monday December 24, 2018 @08:35AM (#18752044)
The A in RAII is for acquisition and it is about ownership, not allocation.

You can do exactly those things in C++ (operator new or allocators, T::T(), T::~T(), operator delete). The language just gives the tools to distinguish a bunch of uninitialized memory from an actual T which holds its invariant (if any).

Re:I disagree with Linus Torvalds about C++ (2009) by jstimpfle on Monday December 24, 2018 @08:48AM (#18752109)
Ok acquisition it is. I don't even understand the difference. Wikipedia doesn't seem to make a distinction either.

Uninitialized memory is all I ever want. And I want to simply write to that memory when the time has come, not hide those writes in a T::T() somewhere in an isolated file with lots of braces and spaces and colons and only few things that actually happen. It's really hard to map out the codepath of a project with lots of constructors and inherited constructors 15 levels down the call stack. Same applies for running it in a debugger.