© Carlo Milanesi 2018
Carlo MilanesiBeginning Rusthttps://doi.org/10.1007/978-1-4842-3468-6_3

3. Naming Objects

Carlo Milanesi1 
(1)
Bergamo, Italy
 
In this chapter, you will learn:
  • The concepts of “value”, “object”, and “variable”

  • The concept of “mutability” of variables

  • The difference between initialization and re-assignment

  • How to avoid warnings for unused variables

  • The concept of “Boolean expression”

  • Which type checks are performed by the compiler for assignments

  • How some operators can perform both an arithmetic operation and an assignment

  • How to invoke functions defined in the Rust standard library

Associating Names to Values

So far, we have seen three kinds of values: strings, integer numbers, and floating-point numbers .

But values should not be confused ...

Get Beginning Rust: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.