Re:Go 1.18
by stingraycharles on Tuesday March 15, 2022 @06:13PM
(#30692584)
I fully agree with your approach. The important thing is that the user now has the choice to use a pointer or not: they can always use a pointer to the optional if they want to use pointers.
Pointers to pointers are generally something you try to avoid if possible.
> the user now has the choice to use a pointer or not
But any benefits of the packing are gone whether I make a pointer or not.
And either way, no nested pointers are involved. We’re not taking pointers to options in either case.
[1]: https://github.com/golang/go/commit/85e7bee19f9f26dfca414b1e...