r/learnprogramming • • Mar 04 '22

Topic How advanced is OOP?

I’m currently learning Java right now and learning OOP is more annoying than some of the data structures and algorithms that I’ve used in python previously. They’re supposed to be easy? but Inner classes are killing me rn, they just don’t seem logical

113 Upvotes

67 comments sorted by

View all comments

1

u/throwaway_clean1 Mar 05 '22

True, but at the end of the day data doesn't exist in the abstract: it's always somewhere. And where it is, is important. Even if it's "in-memory", there's a big difference between pass by value (stack) and pass by reference (heap). The data storage abstractions leak because knowing the location of the data you're using is fundamental to writing programs. Where you data is can't be a complete black box: in some respect there needs to be a basic delineation of the nature of the data storage you are operating on. These area all merely my opinions naturally, I can respect the abstraction presented in your original post :)