vendredi 9 août 2019

Equatable protocol implementation for undefined property list?

I have a class with Equatable protocol implementation. I know that 2 objects of this class are equal if all their inner variables are equal. Objects may contain arrays. Currently I hardcode each value pair comparison which is not agile.

If there is a way to implement such comparison by iterating through the property list? For example with Mirror (reflection)?





Aucun commentaire:

Enregistrer un commentaire