3 ms·
re: telemetry We don't like it as well, just do not enable it :^ re: RAII It is not possible to add RAII support without updating the compiler to call specif
by Leotard6963 3y ago
re: telemetry
We don't like it as well, just do not enable it :^
re: RAII
It is not possible to add RAII support without updating the compiler to call specific methods automatically, so currently it is not an option (as we are using unmodified official toolchain).
But the `g` register defined in Go is of great value, and we are making use of it to provide custom goroutine support, which means you can have custom allocator and scheduler for specific goroutines, so that you can have some of them with GC enabled and others not.
re: compare to V
pcz is a stdlib (plus a cli tool to build), not a new language, you still write Go code but in a slightly different style.
- dolmen 3y agoWhat is that `g` register that you are talking about. It seems to be a reference to some internals of the Go. Do you have some references to some existing documentation about this thing?
- Leotard6963 3y agoI'm afraid there is no such resource, but you may find cmd/compile/abi-internal.md[1] helpful And in brief introduction, the `g` register is a non-scratch register, and is preserved by the go compiler, it stores the poitner to current goroutine (type `g` in the official runtime, a structure serves the similar purpose of TCB), and since all general purpose registers are thread local, the goroutine may enjoy some thread-local features without any thread-local requirements to the running environment. [1]: https://github.com/golang/go/blob/master/src/cmd/compile/abi-internal.md https://github.com/golang/go/blob/master/src/cmd/compile/abi...