title: How do I compare two objects to see if they are the same instance, in Dart?
body: <p>Say I have a class that has many instance variables,. I want to overload the == operator (and hashCode) so I can use instances as keys in maps.</p>
  
  <pre><code>class Foo {
    int a;
    int b;
    SomeClass c;
    SomeOtherClass d;
    // etc.
  
    bool operator==(Foo other) {
      // Long calculation involving a, b, c, d etc.
    }
  }
  </code></pre>
  
  <p>The comparison calculation may be expensive, so I want to check  if <code>other</code> is the same instance as <code>this</code> before making that calculation.</p>
  
  <p>How do I invoke the == operator provided by the Object class to do this ?</p>