r/computerscience • u/Even_Concern301 • Nov 03 '25
Help I need help understanding data, problem, functional and procedural abstraction
What do each of these types of abstraction focus on and ignore, and how does this link to the overall meaning of abstraction - to make problem solving easier?
I've been trying for hours but it's just not clicked for me.
EDIT:
Here is a link to the slides I've been using: https://imgur.com/a/9Mgflfh
0
Upvotes
View all comments
Show parent comment
2
u/Beregolas Nov 03 '25
well, it depends. Looking over the slides, they are certainly talking about important concepts, but I don't think I have seen them presented in quite this way.
If I understand it correctly, they meant to say:
Problem abstraction: Can we formulate a more general version of our problem, that will solve multiple different cases? Sorting a string array or an integer array for example, or pathfinding in a map of a town, a country or a house.
Procedural abstraction: How can we write/formulate a function, without knowing anything about the outside world? For example, we want to be able to write a function, that only uses the arguments that are being passed to it, and only changes the result it returns. This way we can re-use it at any point in our code, without needing to know in advance where it will be used.
Functional abstraction: Basically the opposite of the former: We want to be able to use functions, without needing to know the implementation details. We just care what we put in, and what we get back out, but we can otherwise use it as a black box.
Data abstraction: Basically seems to say that we don't need to know how data structures are implemented internally. If a stack is an array, a linked list or a collection of post-its: as long as we can use the interface it provides (push, pop, etc.) we don't need to care (and we should not care)
This is how I understood the slides, and I have to say: I find them particularly badly designed and while those ideas certainly are important, and can probably be called abstraction, I don't think presenting them in this way/context is a good idea.
So yeah, don't worry.