Re:I disagree with Linus Torvalds about C++ (2009)
by zozbot123 on Monday December 24, 2018 @07:42AM
(#18751867)
> essentially the thing you have to avoid is "new" which is sort of the heart of the language ...
You can use placement-new syntax and ~Object() (direct call to the destructor), together with malloc/free, or any other memory-allocation primitive, just like in C. You don't have to use the inbuilt new operator.
Still, C++ should be considered a near-legacy language these days. Rust (even in its no_std subset) is progressing rather quickly.
You can use placement-new syntax and ~Object() (direct call to the destructor), together with malloc/free, or any other memory-allocation primitive, just like in C. You don't have to use the inbuilt new operator.
Still, C++ should be considered a near-legacy language these days. Rust (even in its no_std subset) is progressing rather quickly.