0

I am wondering if there is a specific term for when multiple representations are data equivalent. Meaning that you can transfer the data from one representation to the other without any loss of data.

Like an in-memory object model that can be read from data files with the guarantee that if you deserialize and then serialize, that the files you started with and the files you ended up with will be equivalent.

There are a couple of laymen descriptions that come to mind: "roundtrip safe", "1 to 1 representation", "ORM", "Non-leaky abstraction".....

I thought the term homoiconic would apply. But, apparently, homoiconicity has to do with equal representation, not equal data.

1 Answer 1

1

I think you're looking for isomorphic.

An "isomorphism" is a 1-to-1 structure-preserving mapping between two sets of objects. Two objects are said to be isomorphic if a given isomorphism maps them to each other.

This concept usually corresponds to our intuition that the two sets are "different representations of the same thing", including the fact that anything you can do with one representation you can just as easily do with the other.


For completeness: The "structure-preserving" part means that any relation which is true of two members in one set must also be true of the corresponding members of the other said. Since that's a bit abstract, consider the set of integers and the set of strings representing integers (without leading zeros or scientific notation or anything else that'd make them non-1-to-1). The set of integers has a greater than relation. We can define a similar greater than relation for the set of strings representing integers. Now, if we choose the obvious mapping that matches 3 to "3" and so on, then this relation is preserved since whenever x > y it's also the case that stringGreaterThan(string(x), string(y)) is true. If we choose a silly mapping that matches 1 to "3" and 2 to "-42" and so on, there are many cases where x > y but stringGreaterThan(string(x), string(y)) is not true, which means that mapping is not an isomorphism.


P.S. In programming "isomorphic" sometimes has a completely different meaning, namely code that can run on either the client or the server without alteration. But it should be very obvious in context whether you're talking about the 1-to-1 mapping or the client-or-server code.

1
  • 1
    It's worth noting that this meaning of "isomorphic" derives from mathematics. Various branches of math use it with specialized meanings, but the Graph Theory definition is easy to understand (and nicely visual).
    – Wildcard
    Apr 8, 2016 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.