| ▲ | bilbo-b-baggins 3 days ago | |||||||
You totally can build it using unsafe and generics. I’ve done it with mmap-backed byte slices for arbitrary object storage. | ||||||||
| ▲ | 9rx 3 days ago | parent | next [-] | |||||||
With a number of caveats. You cannot reimplement arenas as the experiment did without special hooks into the runtime. https://github.com/golang/go/blob/master/src/arena/arena.go | ||||||||
| ||||||||
| ▲ | foobiekr 2 days ago | parent | prev [-] | |||||||
I have done the same; it's not natural to do it this way. Go should actually express an explicit mechanism to do this. When I did it, it felt exactly like trying to use epoll from Go: you can do it, it just feels like crap. | ||||||||