go-pmem
go-pmem copied to clipboard
pnew(string) should panic
In Go, a string is internally a slice of bytes. Right now we don't support creating a slice with pnew() builtin. Currently, code like
s := pnew(slice)
*s = "hello"
works. But s
is actually pointing to volatile memory. This will create confusion.
Instead, we should panic for now.