Thank you for the explanation and the referenced discussion. Obviously, this question does not seem to be so wrong.
The explanations concerning the „=“ make sense.
kballard commented on 6 May 2014 :
I disagree with this proposal. Variable assignment is, well, assignment. But fields in struct initializers are declarations of value, not assignments of value. I also agree with @pcwalton about type-syntax-follows-initialization-syntax.
tbu- commented on 12 May 2014:
As you can see I parse the : as is. It isn't really an assignment because you're referencing an instantiation of the struct.
let x = SomeStruct { x: 4 };
^ assignment happens here
let x = SomeStruct { x: 4 };
^ this is just describing one possible instance of SomeStruct
Another syntax question, which comes to mind here, concerns the brackets of data structures. Tuple structs look like a function call:
struct Color(i32, i32, i32);
let black = Color(0, 0, 0);
Is that on purpose? Because I find that somehow obvious, alternatively with square brackets to highlight the difference to a common tuple or to blocks of statement:
struct Color [i32, i32, i32];
let black: Color = [0, 0, 0];
or generally for structures:
struct zhl [a: i32, b: f64, …]
let beispiel: zhl = [b: 6597.87, a: 76, …];