On 19.03.2016 09:38, Basile B. wrote:
identifier : type = initializer; // straight declaration
identifier : type; // no init
identifier := initializer; // infered type
However later in the function declaration:
"sum := (x: float, y: float, z: float) -> float {
return x + y + z;
};"
I would expect the same system as for variables:
"sum : float = (x: float, y: float, z: float) {
return x + y + z;
};"
That's not the same system. This would claim that everything after the
"=" sign is of type float, which is clearly isn't, even if type
inference was allowed.
One thing that is strange about the syntax is that they use identifier:
type everywhere except for struct fields.