Re:Nil in Go is typed in theory and sort of untyped in practice
by esrauch on Friday April 02, 2021 @08:45PM
(#26677433)
So FYI most of those are misleading. When he's typing into a terminal and it does {}+{} it's interpreting it as and empty code block, and then an unary plus on an empty object, similar to:
{
};
+{}
If you put parentheses around it, or assign it to a value and then print that value then {}+{} isn't empty string.
{ }; +{}
If you put parentheses around it, or assign it to a value and then print that value then {}+{} isn't empty string.