3 ms·
First of all, there are plenty of stack trace libraries to use. Then, the Go creators gave you the chance to roll out whatever mechanism you want, because they
by _ph_ 7y ago
First of all, there are plenty of stack trace libraries to use. Then, the Go creators gave you the chance to roll out whatever mechanism you want, because they made "error" a minimal interface. This is actually quite a feature. You are not forced into a complex mechanism which might be badly fit to your requirements. And finally, rolling out a "stack trace library" should be like writing 2-3 functions which you can use all around in your project.
The interesting thing about the new error APIs is, they are just auxiliary APIs. Every user could have written them, they are not mandatory to be in the core language or even in the compiler. They are just added as a standardized guideline how common tasks are handled and especially are standardized across packages from different maintainers, if they decide to follow that convention.