3 ms·
This is all possible - the issue is that you still must define equality if you want to put it in a collection that cares about equality.
by jcizzle 11y ago
This is all possible - the issue is that you still must define equality if you want to put it in a collection that cares about equality.
- Manishearth 11y agoSure, and then you redefine it so that it can handle protocol objects (where a things of different concrete types are inequal). You may need a new Equatable/Hashable-esque protocol for this, but it should be doable.