title: Go, is this everything you need to know for assignments and initialization?
body: <p>It is just mind boggling how many different ways Go has for variable initialization. May be either i don't understand this completely or Go is a big after thought. Lot of things don't feel natural and looks like they added features as they found them missing. Initialization is one of them.</p>
  
  <p><a href="http://play.golang.org/p/B3HlJ6rOOg" rel="nofollow">Here is running app on Go playground showing different ways of initialization</a></p>
  
  <p>Here is what i understand</p>
  
  <ol>
  <li>There are values and pointers. Values are initiated using <code>var =</code> or <code>:=</code>.</li>
  <li><code>:=</code> only works inside the methods</li>
  <li>To Create value and reference you use new or <code>&amp;</code>. And they only work on composite types.</li>
  <li>There are whole new ways of creating maps and slices</li>
  <li>Create slice and maps using either <em>make</em> or <em>var x []int</em>. Noticing there is no <code>=</code> or <code>:=</code></li>
  </ol>
  
  <p>Are there any easy way to understand all this for newbies? Reading specs gives all this in bits and pieces everywhere.</p>