> In Go, unsafe code is only possible by importing unsafe or C.
of course, this is completely wrong, for anyone reading this. that is simply not how systems work
of course, this is completely wrong, for anyone reading this. that is simply not how systems work
The unsafe package in Go provides unsafe.Pointer, which allows you to convert between a pointer and integral type, essentially allowing you to make pointers of any type to any address, giving up type safety. Without it, Go pointers are safe, because the GC will never free memory that has live pointers, and you can't do math on Go pointers.