this post was submitted on 27 Mar 2025
29 points (100.0% liked)
Out of the loop
12312 readers
1 users here now
A community that helps people stay up to date with things going on.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Nah nah nah, it's just a different paradigm. It's like... it's a different meta, but for programming.
If I was to ELI5, I'd say it's the difference between making a series of objects that interact with each other (OOP) and and creating a very large console with lots of buttons (functional)
Some problems are much easier object oriented. If you have a video game, building a projectile class and adding different types of projectiles makes things suuuper easy to build. Arrows move slow and deal x damage, beams move super fast and deal y.
Functional can be easier to troubleshoot, also easier to crank out novel things, easier to make secure, and even make simultaneous operations trivial. It has very different problems though. You need to put more effort into eliminating dependencies.
The two do not play well together at all they're like fire and water. Sometimes you need water to soak something and make it easier to work, sometimes you need heat to melt something and make it easier to work.
Telecommunications like phones or military applications tend to the functional languages, data, video games, and a lot of the popular languages tend to OOP.
The transition between the two is jarring, and infuriating, but a knowledge of both can really improve your design skills.
You earn your name, Sir Duke.
In my opinion kotlin tries to slowly close the gap between functional and OOP programming. I love the implicit null checks, extension functions and the various list functions😊