Closed
Description
On line 91, the book states: "bindings are required to be initialized with a value". However, the example error that it gives, "error: cannot determine a type for this local variable", is not about initialization but rather about declaration. This is immediately confirmed when "let x: i32;" is shown to compile. Only several lines later, on lines 133 and following, does the book show an actual uninitialized variable error. For people new to complex type systems, it is important to explain the distinction between an uninitialized value and an undeclared (and non-inferable) type.
Metadata
Metadata
Assignees
Labels
No labels