On Wednesday, 20 June 2018 at 12:22:33 UTC, Kagamin wrote:
On Tuesday, 19 June 2018 at 15:03:49 UTC, wjoe wrote:
But maybe I missed something else and the only purpose of D is
to make console applications for *NIX like OSs and expect
users to be professional enough to save that stack trace
before they close the terminal ?
I just read stack trace from console.
Initially D ecosystem focused on windows console applications,
linux support came later, and compiling windows gui application
is not straightforward. Simply because console support is the
first thing to implement.
And how can you be sure that this bug didn't corrupt memory of
the druntime or anything else related to the stack trace, or
even that it is a single bug ?
The state is invalid in a sense that program shouldn't continue
to serve its intended purpose.
Either it is invalid, or if it is safe for the druntime to assume
that it's safe to do whatever it does, then it's just as safe to
assume that an installed signal handler called by the OS is doing
it's thing just fine as well, like stopping a motor.
And how useful is a stack trace that shows a back trace to the
point of the location the Error was thrown compared to a back
trace to the location of the bug (report)?
In most cases stack trace is enough to diagnose the error.
In most cases errors are easy to fix, too. I worry about the
corner cases. The really annoying bugs. The bugs you might only
get one shot at because you don't know how to reproduce, which
you can only diagnose and fix via post mortem debugging.
and provides a better UX than a core dump (especially to
Please explain. A core dump has everything a printed stack
trace has and more and is as easy as using the debugger itself.
Do you know how to extract information from it on an unfamiliar
OS? Reading stack trace is easier and self-evident.
Counter question: How do you develop for an unfamiliar OS with
unfamiliar tools in the first place ?
The concept of a debugger and a memory dump is fundamentally the
same on every OS I know or care about just as much as the D error
implementation doesn't care about niche cases.
Of course you can debug your applications via print to console if
you feel that this is productive enough and ignore the bugs you
can't fix that way.