I don't understand this trend of hiding data in OOP, data is what computation is all about?!
Conversation
Replying to
Hiding is nice because that way do don't end up accidentally depending on internal implementation stuff, which could make it harder to change stuff down the line. ML modules and abstract datatypes are also great approaches to this!
But yeah, the big issue in OOP is the stuff you are hiding is also mutable, and it's very hard to understand what's going on, and you can lose track of it, because it's hidden. That's frustrating!
1
2
Jazz. I've noticed some people in FP don't like hiding at all, but I'm not convinced. I think expressing intentions on how API should be used is a powerful way to say “this is what this library does and its limitations”
1
1
Yeah - I think it's nice able to hide away stuff in programming - so that you have a far smaller surface area to keep track of. Either as a user, or a library maintainer.
2
This Tweet was deleted by the Tweet author. Learn more
I mean, you don't *have* to hide stuff in Java? Or are you talking more about the ecosystem and developer culture?
The thing I annoyed with in Java is the side effects, which makes it really easy to build leaky abstractions if you aren't careful:
Quote Tweet
Replying to @brendanzab and @typer_uma
But yeah, the big issue in OOP is the stuff you are hiding is also mutable, and it's very hard to understand what's going on, and you can lose track of it, because it's hidden. That's frustrating!


