3 ms·
> maybe, just maybe, we won't see "new"s or "delete"s in most future codebases? I haven't seen 'new' or 'delete' in the wild for a decade now. (Well, except f
by otabdeveloper2 7y ago
> maybe, just maybe, we won't see "new"s or "delete"s in most future codebases?
I haven't seen 'new' or 'delete' in the wild for a decade now. (Well, except for various legacy libraries or student code on Github.)
- geezerjay 7y agoQt code uses 'new' extensively because Qt components take ownership of components and manage memory allocation automatically.
- hellofunk 7y agoWhat you describe is still common practice in the language, but the mechanisms no longer use a new or delete to achieve that.
- roel_v 7y agoMe too. I've been writing pretty much only C++ for 20 years, and if I'd go back and count, I think I'd have maybe a dozen times where I used new/delete, none of those in the last 10 years. Like all languages that are actually used, there is much one can complain about in C++, but claiming that one needs a lot of manual memory management is done mostly by people who haven't written much if any C++.