title: Why does Rust bother with "let"?
body: <p>I was interested in Rust, and so I started reading the Rust programming guide on the Rust website, and discovered that variables are declared in the following manner:</p>
  
  <pre><code>let x: i32 = 5;
  </code></pre>
  
  <p>Which means assign the value integer 5 to the variable type integer 32 bit which shall be referred to by the notation <code>x</code> from this point onwards.</p>
  
  <p>My main question is why is the <code>let</code> keyword is there at all? It seems redundant, as if it doesn't actually "do" anything.</p>
  
  <p>I assume the compiler would be able to tell that the following is a variable (or const variable) declaration:</p>
  
  <pre><code>x: i32 = 5;
  </code></pre>
  
  <p>There doesn't appear to be a reason for a <code>let</code> keyword, but presumably there <em>is</em> a smart reason because Rust is focused on safety. So what is that reason?</p>
  
  <hr>
  
  <p>Edit: Addition: As function arguments, the let keyword is not required. Here is an example:</p>
  
  <pre><code>fn add1(x: i32) -&gt; i32
  {
      x = x + 1
  }
  </code></pre>
  
  <p>This seems a bit strange - this "looks like" a pass by reference because of the missing <code>let</code>. But it's not. It's a pass by value. (Or at least I think it is.) Is this a syntactic inconsistency?</p>
  
  <hr>
  
  <p>As an aside, I would find it a lot more logical to change this statement around and write:</p>
  
  <pre><code>i32 x = 5;
  </code></pre>
  
  <p>Put a colon in there if you will:</p>
  
  <pre><code>i32: x = 5;
  </code></pre>
  
  <p>I guess I would find that more logical because:</p>
  
  <ul>
  <li>When programming you usually know what "type" of data you want before you think of a name for it.</li>
  </ul>
  
  <p>Perhaps some think the other way around? But this brings me to another point; how can one declare a several variables of the same type in Rust? Such as:</p>
  
  <pre><code>let x, y, z: i32 = {4, 5, 5} // A guess of what this might look like?
  </code></pre>
  
  <p>Or is this just not allowed in Rust?</p>