News for hackers. Stuff that matters.
Re:Why is Zig so Cool? by fpoling on Saturday November 08, 2025 @02:34AM (#45854886)
There are plans in Zig to allow to include custom information into error stack trace https://github.com/ziglang/zig/issues/14446.

But that is not implemented.

In any case, when debugging annotating error with extra context often is not enough. One often needs a detailed trace of what happens before.

So what I would like to see in any programming language is ability to do a structured logging with extra context from the call stack (including asynchronous support in languages that have that) that has almost zero overhead when the log is not printed.

Various languages and runtimes have some libraries that try to do that, but the usage is awkward and the performance overhead is not trivial.

Re:Why is Zig so Cool? by ulbu on Saturday November 08, 2025 @05:13AM (#45855621)
closed as not planned :)
Re:Why is Zig so Cool? by ayende on Saturday November 08, 2025 @06:03AM (#45855831)
Not this is explicitly marked as Not Planned
Re:Why is Zig so Cool? by jandrewrogers on Saturday November 08, 2025 @11:36AM (#45857952)
I made a go of this using the stacktrace functionality built into C++23. The overhead and complexity it introduced made it not worth it, unfortunately. There may be a way to do this but it seems non-trivial in implementation.