Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I added 2 numbers and came up with 5. What numbers did I add?

You can’t know, because the abstraction (add) destroys information. A “good “ abstraction destroys information that doesn’t matter, or maybe matter in a given context.

You can hang on to all of that extra detail, but it seems like that extra detail slows down drawing inferences.

When I claimed adding resulted in 5, you probably didn’t care if it was 5 apples or 5 skyscrapers. The addition results of 5 are the important part.

Kinda hand waving, but what is included and what is left out is the heart of abstraction imho. And when it’s left out, you can’t get it back.



You are right.

How Aristotle illustrated abstraction – by extracting the definition of triangle. Reversible abstraction would mean the possibility of taking a triangle in the Cartesian space and reconstructing the actual object that includes an instance of this triangle. We’d have to be able to reconstruct its material properties.

It is precisely this impossibility that is essential to abstraction. It involves the removal of properties of a particular to arrive at the abstract – the common, the universal.

Now, it is possible to arrive at a poor, incomplete abstraction. Imagine if we dealt with red triangles and green triangles, as opposed to just triangles. If we wished to operate on the its underlying triangle, we would have to remove the colour at each operation. It would be an unused variable. We don’t want that – so we remove the property of colour from our triangle operations entirely. And thatbis the only way to deal with triangles.

Reversibility is simply a different property that can’t be attached to abstraction is if we wish precision at all.


I think there is something to the nature of your addition example that is counter to your point. Addition being an "abstraction" doesn't make it destroy information it's just an algebraic property of addition. If you instead took multiplication of prime numbers as your "abstraction", no less abstract than addition, then every product would have a unique factorization in the primes. Whether either of these operations makes sense for your problem and thus whether their limitations apply doesn't have anything to do with what "abstraction" you choose. They are either isomorphic to some aspect of your problem or they aren't.


I think the parent's point is that it doesn't need to be like that.

You might be an abstracted adding thingy that adds two numbers to get some other number. But you could also implement a visitor pattern that hooks into the guts of your implementation, allowing me, for example, to inject a logger to record what those numbers were.

Likewise, some ORMs have some abilities to bypass the query engine to hand-write a query, or change the way data types are serialized/deserialized - the key here is basically providing an API to peek under the hood when the user needs to do some stuff at a lower level than the abstraction dictates


There actually is such a thing as reversible computing(?) that keeps around enough intermediate values to run the code backwards to the inputs. Not sure what it is actually good for. Not to be confused with time travel debuggers, though they are similar in spirit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: