On Wednesday, 18 September 2019 at 01:03:27 UTC, Nicholas Wilson
wrote:
I think a mixin that does
string LOG_SCOPE = q{
callDepth++;
scope(exit) callDepth--;
}
is probably the easiest. for bonus points
string LOG_SCOPE = q{
callDepth++;
debug_log(__FUNCTION__);// or __PRETTY_FUNTION__
scope(e
On Tuesday, 17 September 2019 at 17:11:09 UTC, Stefanos Baziotis
wrote:
I think it's better to give a concrete example rather than
explaining this vaguely.
-- The question --
Can we do better ? For one, I believe that because D does not
have a preprocessor,
we have to do an actual declaration
I think it's better to give a concrete example rather than
explaining this vaguely.
- For those who are familiar with LDC internals:
I want to create something like LOG_SCOPE. You can skip the
explanation.
- For those who are not:
Imagine that you want to track down how deep in the call stack