My day job is programming in Java, and I use streams and lambdas everywhere. I use very little of OO concepts like inheritance. I try to make my data immutable and write functions and methods without side effects, wherever possible.
Popular recent languages like Go, Rust, and Swift borrow a lot from functional programming paradigms.
I'm curious where you are seeing OOP still going strong.
huh?!
It feels like we're just left with a heavyweight syntax for structs + functions bound to data, which feels like pretty thin gruel.
That seems a little early. I think the 90's were still pretty inheritance-centric.
Java only came out in 1996. UML 2.0 was releaeased in 2005.
I'd say the composition over inheritance movement wasn't widespread until the 2000's,
I guess my memory was wrong (or I was hanging around the wrong crowd in the 90's.)
The concept of composition has long been the bread and butter of functional programming paradigm since antiquity. OOP just adopted it later in the wake of nightmare inheritance hierarchies.
golang doesn't. It's quite the antithesis really. They embrace mutability, no null safety, and only recently got generics.
Nowadays I can find a few isolated uses for "classes", but never, and I mean not a single situation where "OOP" (object ORIENTED programming) could ever be preferrable to just using data and functions, whether that's strictly functional programming or plain old procedural.
Could you share more about where you believe OOP hierarchies offer an advantage?
I personally have used a lot of UI libraries, and I would never willingly use anything object oriented again even before React clearly became "the thing". So this is a fairly suprising claim to me in 2022, not so much if it had occurred 10 years ago.
>> much more widely used and honestly now in hindsight probably better tool in most cases.
Knowing only OOP means OOP becomes the only tool for all cases.