> Array new and delete
> When you write new in your applications, you are creating unmanaged objects, and you are then required to call delete later on if you don’t want to risk leaks. So don’t use new and delete at all, as this is considered a C++ bad practice. Better yet, working in modern C++ allows you to use smart pointers and Standard library container classes that make it easier to match every new with exactly one delete.
The text is reasonable, but why is the heading "array new and delete"? There is a difference between new/delete and new[]/delete[], and calling delete[] on something created by new or vice versa is indeed going to cause problems. But that problem (and hence the section title) is more or less orthogonal to what the section body talks about.
Edit: The corresponding slide in the presentation does talk specifically about this kind of mismatch. It also comes to the same conclusion as the text ("just use the STL"). The connection between title and body was apparently lost in translation.
Maybe as more general feedback, I'm getting a strange vibe from this blog. Lots of "top 5 <C++ thing>" posts, links to Patreon-gated articles, ads for blog-owner-written books... Which would all be fine, but that plus an inconsistent summary of someone else's talk raises a lot of warning signs for me.
Obviously it's bogus for the language to let you say you want an array of 26 chars and then treat that as a reasonable place to write an unknown number of characters, but that's a language fault.
I mean, given what is intended in the examples is a string, obviously you should use an actual string. But if you want an array, you should be able to use an array for that, and it's silly that instead you're asked to use a substitute.
(1) https://github.com/microsoft/STL/blob/62137922ab168f8e23ec1a...
But on the other hand, I already am splitting hairs. C++ comes with actual arrays, which lack bells and whistles, adding the bells and whistles to a class named "array" in the STL instead does not add them to actual arrays. If it did that would be a fine fix, but it doesn't.
Rust users who've told the compiler that their function wants, for example, an array of 26 chars can cheerfully assume in the function that the array has 26 chars in it. The compiler won't let anybody call that function with anything else so it'll be fine. It can make sense to do that, although perhaps not with exactly 26 chars.
C++ users can write a pretty similar looking function signature, including that size constraint - but, a C++ compiler just ignores the integer 26 and silently gives them a pointer to what may or may not be some number of chars, even though that's clearly not what the author intended. They need to write something quite different if they want the compiler to look after this constraint, and if they knew to do that they wouldn't be in this mess in the first place.
As to your point... C++ doesn't really work that way. The STL can't add methods to "actual arrays" as you call them, and the compiler can't really do it either. You could extend a compiler to do it but then it wouldn't be C++, strictly speaking.
Some of the other issues like type coercion between arrays and pointers is both not that big of a deal, has well known solutions, and changing would break so much could it's not feasible to do.
While there's some verbosity to the STL (the error messages are worse than anything else) that's just what programming in C++ is like. It is not terse.
std::string would work in a similar way, except it would be `const`
Rust is a young language, perhaps in twenty years we'll know that editions weren't powerful enough, but it seems like a good start. This year will see a new edition (Rust 2021) with a handful of such changes, such as requiring you always write 1..=9 not the historical alternative 1...9 when you mean that the range should be exactly 1,2,3,4,5,6,7,8,9.