C++ has the additional problem that each iteration takes about three years and only a couple of compilers are developed with tooling in mind.
For anyone curious how bad it was, here’s a StackOverflow post from 2013 asking about intelligible async stack traces in C# with a proper solution not delivered until 2018 https://stackoverflow.com/questions/15410661/is-it-possible-...
When it was finally delivered it was done by an amazing individual(Ben Adams) picking up the slack for Microsoft.
Last time I used Node in anger, last year, their async stack traces were even worse, losing the stack traces at the await point. Hopefully they’ve fixed it by now.
In fact, bare metal deployments without runtime are non-conforming from ISO point of view, if I am not mistaken.
Ironically managed environments go back to Burroughs Large Systems, Xerox, UCSD, ETHZ, it is just that we had a couple of decades where focus went elsewhere, and just like containers and VMs they are being rediscovered.
EDIT: typo "with" => "without"
a freestanding implementation is conforming.
What do you mean by "runtime?" libc just makes it so you're not writing your own system calls. Things like attaching a profiler post-hoc, hot-replacing code, optimizing code, remote debugging, etc. aren't really things in C-land.
And keeping all of the above when targeting bare metal deployments as well.
All of that falls into the language runtime from compiler design point of view.
I don't understand at all which kind of control which is different from something else related to C or C++. Can you please be a bit more cpecific in describing what you think that .NET and JVM have?
Edit: to the reply below, in full "A virtual machine." Duh. Of course .NET or JVM have a virtual machine each. But what's the support for the rest of the claim:
> VMs have a lot of sense nowadays, especially with multithreading. No one can now dismiss them because they are "heavy" or "unnecessary", unlike, say, 10 years ago
I failed to see how that follows from the starting statement.
I don't see how the iteration of the C++ standard is relevant for the development of debug tooling.
Of course there would be a limit of depth, but there's always the option to pass an empty continuation and allow the stack to unwind. Since they are coroutines they don't care if you unwind the stack and wind it back up. What I mean is the stack could look like "A-B-A-B-A-B" or "A-B .. A-B .. A-B" or "A .. B .. A .." it doesn't matter. For release build (not debugging) you would just set the depth to 1 and have normal non-nested coroutines.
I can implement this with macros (you wrap your return statements and your co_xxxx statements with a macro) using hand-rolled coroutines. I haven't yet gotten familiar enough into C++ std coroutines to implement it there or see if they allow it to be done without macros.
g++ -Og -ggdb3 wtf.cpp