Earlier quoted context omitted.
In Nimrod, when you are declaring a variable with an explicit type, the syntax is: var x, y: int as opposed to the more concise C family way of doing it: int x, y; In C, there is no keyword needed to signal that this is a variable declaration. Similarly, in Nimrod, if you declare the return type of a function, you write it in addition to the "proc" keyword. IMO, the C++0x/D way of declaring a type inferred variable/f…
If you have type inference, this is usually not a problem. Also, it is much easier to parse, both for humans and compilers. Rust uses the former way, and it's extremely readable. Even Herb Sutter, of C++ fame agrees: > One of the things Go does that I would love C++ to do is a complete left-to-right declaration syntax. That is a good thing because the left-to-right makes you end up in a place where you have no ambigu…
var ptr_to_array_of_ptr_to_int : *[](*int)
would become something like this: *[](*int) ptr_to_array_of_ptr_to_int
The former syntax is slightly easier for a program to parse, makes it easier to see variable names, and is more consistent with typical syntax for type inference during variable assignment: var something := some_function(whatever)
auto something = some_function(whatever)
However, the latter does, as xaa said, eliminate some keystrokes. I also happen to find byte foo = 10
to read more nicely than any of these: var foo : byte = 10
var foo := (u8)10
var foo := 10'u8