Protocols and Equality

I recently found myself in the position where I am happily using a protocol, and needed to work with equality in a context that can be summed up as: var currentObject: MyProtocol = Thing1() { willSet{ if newValue != currentObject { //perform costly operation } } (But really, equality is everywhere. Want to get the […]