The Go programming language
I've mainly used Java which doesn't suffer from this particular problem. But I've often heard Java criticized on the grounds it captures values not variables, and that most other languages apparently capture variables. I remember learning Lisp at uni and being taught that it captured variables, for example.
So do other languages suffer from this problem as well? How do they deal with it?
Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
The Python programming language
Python will also do something like that. In fact it does something smarter, since Python 3.6 it snips out repeated lines in self-recursive calls: https://github.com/python/cpython/issues/71010
Blazing fast, structured, leveled logging in Go.
What else would you expect from a structured logging package?
To me it absolutely makes sense as the default and standard for 99% of applications, and the API isn't much unlike something like Zap (a popular Go structured logger).
The attributes aren't an "arbitrary" concept, they're a completely normal concept for structured loggers. Groups are maybe less standard, but reasonable nevertheless.
I'm not sure if you're aware that this is specifically a structured logging package. There already is a "simple" logging package in the sodlib, and has been for ages, and isn't particularly fast either to my knowledge. If you want really fast you take a library (which would also make sure to optimize allocations heavily).
Zero Allocation JSON Logger
Be aware that there is a performance impact compared to using zerolog directly  (my uneducated guess is it is likely due to pointer indirection).
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
slogx - slog package extensions and middlewares
3 projects | /r/golang | 1 May 2023
What is the common log library which is industry standard that is used in server applications?
5 projects | /r/golang | 21 Mar 2023
Advice for writing enterprise-level API in Go?
8 projects | /r/learngolang | 18 Dec 2021
Should we be sanitizing log messages?
3 projects | /r/golang | 14 Dec 2021
My opinionated way to write and test a go http server
3 projects | dev.to | 4 May 2021