Re:Proposal: expression to create pointer to simple types
by gowld on Monday April 19, 2021 @10:30AM
(#26863130)
I think the way to say it is that Go requires you to declare every allocation, but allows over-declaration in the case of copying.
> := [...] an error to use it when it doesn't allocate.
> := [...] not allocating if you have a variable on the left that is already allocated,
This appears to be a contradiction.
I suppose you mean something like "error to use it when there's no possible context where that line of code would allocate"; what's an example of that?
> := [...] an error to use it when it doesn't allocate.
> := [...] not allocating if you have a variable on the left that is already allocated,
This appears to be a contradiction.
I suppose you mean something like "error to use it when there's no possible context where that line of code would allocate"; what's an example of that?