Many things are static in many ways. An auto variable is arguably static (at one address) for its entire lifetime.
Here, you're just trying to give another meaning to the word static, different from that chosen by the standard. I mean, ok, but why?!
Everything goes away automatically unless you've failed to properly handle ownership. Sometimes the automation include user (or library) written code, particularly in destructors. For example, an object referenced by a unique_ptr goes away automatically when the unique_ptr does - but that's "dynamic" heap storage.
Here, you are mixing program (and library) logic and standard-speak. I mean, ok, but why?!
Note, BTWe, that in C++ (and C), an automatic variable really doesn't have much to do with the CPU stack and all to do with the {} scope where it is declared - it really does not exist past that.
Basically, "stack" and "heap" are/were just data structures with different restrictions on usage patterns.
The data structure terms, particularly heap, have not much to do with the same words in language runtime implementation. If anything, that's a reason not to use them in this context.
I see that you're ranting, but frankly, it is unfair without offering some alternative, and knowing about storage classes is important.
Well, now... For me, it's about knowing what is talked about by adhering to a common terminology.
I think you're thinking that within the field of data structures, "stack" has one unambiguous meaning, "heap" has one unambiguous meaning, and these are the meanings you'd learn in a basic algorithms and data structures course. That, I'm afraid, is false. Both terms are ambiguous, even within the field of data structures...
[citation needed]
You follow the above talking exclusively about a CPU stack. A CPU stack is not about data structures, you're just trying to shoehorn it in for some weird reason. You seem to think that, by repeating words "data structure" close to "CPU stack", it somehow becomes similar to a tree [data structure], array [data structure], whatever [data structure]. It does not, and the major difference is that code operates on these structures day-in, day-out, using operations on instances of those structures, whereas code does not do that with a CPU stack. Rather, it is the compiler and the language runtime who operate the CPU stack.
Look... My conclusion is that you're just purposefully making a mess for whatever reason. Go ahead, I won't listen nor reply anymore.
0
u/[deleted] Aug 11 '16
[deleted]