It makes it much harder to tell the type of a variable, its moment of declaration, and initial value.
The same kind of argument applies to 'auto', which found its way into AngelScript nonetheless.
Not exactly. The auto keyword has its flaws and a good programmer knows not to overuse it, but it has only one of the issues I mentioned, which is that it's hard to tell the type of a variable. It doesn't however, create ambiguity regarding the moment of declaration or initial value. Let me demonstrate:
auto x = 1;
x += 1;
Easy to tell when x was declared - there's a keyword in front of it. The line especially stands out in editors with syntax highlighting.
x := 1;
x += 1;
The lines differ only by one character. In a busy function, it could take a long time to tell whether x is local or global.
auto g = 1.f, d = sqrt(2), i = pow(2, 4), t = sin(3);
Easy to tell the initial value of each variable.
g, d, i, t := 1.f, sqrt(2), pow(2, 4), sin(3);
It takes some counting to determine which variable has which initial value. Again, this is a trivial example but in a real life situation where variable names and initial values were somewhat longer, it would become unreadable.
Even the type is actually easier to tell with auto, because unlike in short declarations, you cannot declare multiple variables of different types in a single auto declaration, so if you know the type of one variable, you know them all.
Again, I was asking for benefits of short variable declarations. I think a proposed addition should be supported by rationale.
C++ is my primary and favorite language and my team chose AngelScript largely due to its resemblance to C++. I also know several other languages, and although Go is not one of them, Lua is, and it has both of the features you're suggesting. Not a fan of it. I'd rather type more code and know what I'm doing when I return to it after a month.