title: Why does golang use parentheses for byte slice and brackets for string slice?
body: <p>I've always wondered why in golang you create a slice of bytes using parentheses:</p>
  
  <pre class="lang-golang prettyprint-override"><code>[]byte("foo")
  </code></pre>
  
  <p>While creating a slice of strings using bracket notation:</p>
  
  <pre class="lang-golang prettyprint-override"><code>[]string{"foo", "bar"}
  </code></pre>
  
  <p>Are parentheses used just because the expression expects a single value (e.g. the string <code>"foo"</code>), and so the parentheses are used as a 'grouping' syntax?</p>
  
  <blockquote>
    <p>Note: the use of 'group' or 'grouping' to define this behaviour is very likely incorrect on my part, but I don't have a better word to use off the top of my head.</p>
  </blockquote>
  
  <p>I presumed so because golang also use parentheses in a grouping sense for things like type asserting <code>i.(T)</code> and for pointer dereferencing <code>(*p).z</code>.</p>