I had learned programming from OOP, and the way I feel is at a small level, the OOP mental model works alright, but once I started working on larger more enterprise projects, I felt that not everything models as OOP as straightforwardly.
I actually feel some of the points in the article here. Often you have behavior that spans multiple objects worth of data. And you also often end up with needing to model relations and deep hierarchies with which Objects can become quite verbose for.
Then I learned about Functional Programming, and at first I just couldn't wrap my brain around it at all. Where OOP felt way more intuitive, FP felt foreign. But I persevered, and eventually FP started to really click, and my brain started to be able to now think through problems in an FP way, I started to understand how I could model my business problems with FP, where before I could only imagine how to do so in OOP.
At this point, I find FP much more natural, but I had to train my brain for it. Now that I can figure out how to model things in both OOP and FP, it often seems so much more straightforward to use FP for a lot of problems, over using OOP.
That's why I was interested in asking parent about this. Because I can't tell if my OOP thinking just came from the fact I first learned to model programs using OOP, or simply because OOP is more natural.
Either way, I believe learning to model things using FP is really worth it, at least in my case, now that I can do it, I much prefer it.
The biggest AhHa! moment with FP for me, was actually how similar to OOP it can be in practice, except it's much more flexible. Which is why I now just find it is almost always better for my problems.
Instead of thinking that a Car has methods Drive, OpenDoor, OpenTrunk, AddPassenger, etc. I see that a Car is really just data about a Car's current state. It has a position, a number of passenger, a doorState, a trunkState.
So Car goes from being a remote control for controlling a Car, into data about the current Car state.
And now when you want to change the state of the car, you just go and change it using whatever function you want to manipulate it with. And this function can go anywhere it makes most sense. If the function needs to change the state of the Car and the Driver at the same time, there's no confusion here, Driver is also just data about a driver's state, and you can just have some external function that easily takes a Car and a Driver and just change their state together.