You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: