Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
netikras1668012dPeople tend to hate things they have no capacity to master :) except for Liferay. Everybody hates Liferay.
netikras1668012d@jennytengsonM See? Everybody hates Liferay...
A pro tip: if you are ever asked to consider Liferay for the project -- immediately answer NO.
If you are ever recruited for a Liferay project -- RUN.
Unless ofc you have some solid discounts for painkillers, as you will have lots of horrible headaches for sure.
When Alan Kay coined the term OOP, it had nothing to do with glorified structs containing function pointers. It was about actors passing messages, which is a much more powerful idea that is fully possible even in a procedural implementation.
What we have as OOP today is a good fit when you actually have such objects in the problem domain, and that's the case for GUI and simulations (including many games).
Especially when you end up with horrible nebulous ControllerManagerHandlerFactories that don't have any problem domain mapping, you know that's OOP gone wrong.
VaderNT133911d> this god abstract class that has lots of abstract methods, some of those methods will only be used by other classes
This. Inheritance is not a copy-paste replacement, but gets misused for that all the time. Suddenly there's an inheritance hierarchy four or more layers deep, of which you have to know everything to understand what the leaf classes actually do. And then the requirements change sligthly and nullify a basic assumption of a base class. The resulting refactoring is *cough* such fun *cough*.
Inheritance is maybe the strongest relation between two pieces of code. Don't use it unless you have a good reason.
OOP will never beat functional programming period.
We live in distributed, multitasking, asynchronous world that is mostly not object oriented.
@vane That's overrated. FP bans mutable state and is hailed for concurrent programming.
The downsides are that not only accidental, but also intentional sharing of mutable state goes out of the window. On top of that, you now have to deal with stale state instead of concurrent state, which is not really easier.
FP is suited when it's about computing results like in math functions, but not when it's exactly about state or behaviour (which a lot of code is).
@Fast-Nop well for basic programs that need to get data and display something it’s not that bad. Those programs are probably 90% of all software and mostly what you do is display objects so easiest way is to get objects.
I don’t deny that there are no use cases for OOP, my point is that OOP is ok for displaying something simple.
For processing data when you want to know what is input and what is output functional programming shines.
For me displaying is like the last step. Maybe most important from business perspective but least important from architectural one.
@vane OOP is also fine for simulations and games where you have a lot of different instances of the same things (particles, NPCs) with similiar behaviour but each different data.
But I think we do have a fair arena where all paradigms can be tried, and it should favour FP because it's about computing stuff. So why is there no competetive chess engine in Haskell?
The first three project hits in Google were:
1+2) Abandoned before even implementing the rules completely
3) Knows the rules, but plays so weak that I had no trouble mating it in 19 moves.
Maybe cause it’s easier to start writing oop then functional code but it doesn’t mean oop is better cause it’s easier.
For me I write better software since I know functional language but maybe it’s just me that I understand things better by learning some stupid erlang or clojure.
Now when I deal with graph structures recurrence is not a challenge.
I still wonder how the fuck people write oop code without knowing what design patterns are. They use RX shit cause they don’t understand actors or observers. They use flux in react cause they don’t understand memento and command. Those are simple things like data structures yet nobody cares. Best part is some of those patterns like actor are from 70s and now mainstream is like wow it’s awesome.
I am like WTF people programming doesn’t end on learning for loop.
On the other hand you can’t write functional software without knowing what recurrence is, you will make less mistakes and when your code compile it’s 99% chance it works. That’s what it is about for me.