News for hackers. Stuff that matters.
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?

Re:Proposal: expression to create pointer to simple types by fred256 on Monday April 19, 2021 @10:34AM (#26863174)
a, b := 1, 2

If either a or b (but not both) were already defined, this won't re-define (and reallocate space for) them.

Re:Proposal: expression to create pointer to simple types by gowld on Monday April 19, 2021 @10:44AM (#26863269)
Aha, lossy compression syntax!