Re:Things Go needs more than generics
by maleldil on Monday October 04, 2021 @07:39AM
(#28745421)
What if I want to pass a pointer into the function (maybe I want to mutate the object), but I want that pointer to be non-nil?
You make it seem like value types solve this problem, but they don't. C also has the same thing you're talking about, but it still has nullability problems.
I think other comments are not even asking for anything complex. Something akin to C++'s references (which cannot be null) would already be a step forward.
You make it seem like value types solve this problem, but they don't. C also has the same thing you're talking about, but it still has nullability problems.
I think other comments are not even asking for anything complex. Something akin to C++'s references (which cannot be null) would already be a step forward.