News for hackers. Stuff that matters.
Re:Pretending OOP Never Happened by cy_hauser on Friday May 15, 2020 @03:29PM (#23196358)
Not sure what you're saying. Are you saying OOP does not have information hiding or that the "information hiding" in OO languages should not be called information hiding as per Parnas? Or something else entirely?
Re:Pretending OOP Never Happened by _0ffh on Friday May 15, 2020 @06:29PM (#23198276)
I'm saying that just because someone learned about a concept (in this case, information hiding) in a certain context (OOP), that does not mean that this is where that concept originated (which was implied). It's a common mistake I see all the time.

In short, information hiding is a concept from modular procedural programming that was then adopted by OOP, not an original OOP concept.

In general, OOP is really mostly a case of "let's take a bunch of known best practices and encourage (or even enforce) them on the language level". Procedural programming can be as object-oriented (or not) as you like. With minimal amounts of syntactic sugar in the compiler, like e.g. rewriting "foo.bar(...)" to "bar(foo,...)" you won't even be able to easily tell the difference when you see the source code.

While I'm at it, the critique that procedural programming necessarily results in a quagmire of global state is also wrong. It's all up to the programmer. Nobody forces you to use globals. Some OO languages try to force you not to, but usually fail in the face of determined opposition from the coder.

In essence, foo coders will find a way to produce foo code.

Re:Pretending OOP Never Happened by cy_hauser on Friday May 15, 2020 @06:45PM (#23198398)
Got it. Makes sense.
Re:Pretending OOP Never Happened by revertts on Friday May 15, 2020 @06:11PM (#23198125)
I read their point as “information hiding is not a concept exclusive to OO.”

Whether or not the original quote meant to imply that I’m not sure, but do see how it could be read that way.