On 30/05/13 18:43, Russel Winder wrote:
On Thu, 2013-05-30 at 02:19 +0200, MrzlganeE wrote:
[…]
In places where I write a bunch of short mathy code, I do not
want to use 'auto'. The := operator would allow to declare a
variable, deduce its type, and define its value.
void main() {
x := 1;
y := 2.0;
z := x * y;
y = 3.0;
}
[…]
for (i := 0; i < 24; i++) {
}
Go does exactly this, and it is good.
Less is more.
Except in the case of Go with their inane policy of injecting ';' into
the lexical analyser at the end of lines for the sake of brevity.
Peter