Closed royKarseboom closed 2 years ago
I read pointer.ToX(v X)
as "[give me a] pointer to X".
In any case, that module will not have breaking changes in v1, and I plan to wait for https://github.com/golang/go/issues/9097 or https://github.com/golang/go/issues/45624 to be accepted and implemented before I release v2. If you want a different syntax, and you already have some module in from the list at #8 in dependencies, you might want to use them instead.
Hi, I find the
pointer.ToX(v X) *X
a bit confusing since by reading it (without looking at the parameter and return value) I would think it would turn a pointer of X to the value X, which it doesn't. Maybe we could change it toptr.OfX(v X) *X
Also, in a similar manner, I thinkpointer.GetX(v *X) X
would be clearer asptr.ToX(v *X) X
To summerize, I'm suggesting the following changesI don't mind opening the PR, would you accept?