Retroactive conformances are never a good idea. @jrose has written what I think are the canonical pair of articles on the topic.
Even for CustomStringConvertible
, this is not fine. I might go further and say that especially for CustomStringConvertible
this is not fine, as the only purpose of a CustomStringConvertible
conformance is to enable nicer print
statements, and in your code you can get those by printing something else.