title: In Swift can I use a tuple as the key in a dictionary?
body: <p>I'm wondering if I can somehow use an x, y pair as the key to my dictionary</p>
  
  <pre><code>let activeSquares = Dictionary &lt;(x: Int, y: Int), SKShapeNode&gt;()
  </code></pre>
  
  <p>But I get the error:</p>
  
  <pre><code>Cannot convert the expression's type '&lt;&lt;error type&gt;&gt;' to type '$T1'
  </code></pre>
  
  <p>and the error:</p>
  
  <pre><code>Type '(x: Int, y: Int)?' does not conform to protocol 'Hashable'
  </code></pre>
  
  <p>So.. how can we make it conform?</p>