2 ms·
Yes, there are different tiers of abstraction, but I think this article, about lifetimes, would be better if it just discussed scope. As is, it goes into imple
by Someone 6y ago
Yes, there are different tiers of abstraction, but I think this article, about lifetimes, would be better if it just discussed scope.
As is, it goes into implementation details for block scoped storage, but just posits that new and delete exist without mentioning any detail. That’s unbalanced.
Rereading it, it also assumes you know C well enough to know about malloc, so maybe, just saying “C++ can automatically do stuff when variables go out of scope or when you allocate or free memory. Here’s what it can do…” might be sufficient)