title: Comparing two delegate objects are same instance
body: <p>I'm confused about comparing delegates. What I am going to do is to check two players to see if they are same. But when I try the code below I get a compiler error that says: "IPlayer is not convertible to MirrorDisposition". What is the ideal way to check for delegates in Swift?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var str = "Hello, playground"
  
  
  protocol IPlayer{
      var x:Int {get set}
  }
  
  protocol IMatch{
      var ballOwner:IPlayer? {get set}
  }
  
  
  class Player:IPlayer{
      var x:Int = 5
  }
  
  class Match{
      var ballOwner:IPlayer?
  }
  
  
  var firstPlayer:protocol&lt;IPlayer&gt; = Player()
  var secondPlayer:protocol&lt;IPlayer&gt; = Player()
  
  //here is the problem !
  if firstPlayer == secondPlayer {
     println("equal")
  }
  
  
  // if i check with reflection there is no error. But is it correct way?
  var a = reflect(firstPlayer)
  var b = reflect(secondPlayer)
  
  if a.objectIdentifier == b.objectIdentifier {
      println("equal no error")
  }
  </code></pre>