General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
ThePrimeTime
comments
Comments by "" (@jboss1073) on "Dependency Injection | Prime Reacts" video.
@dealloc But only OOP people call it "DI". FP people call it "passing an argument".
9
Because OOP people don't follow their own theory, so they feel inadequate and need to sound smart to feel better.
7
@depafrom5277 OOP has a specific definition of "objects" that has nothing to do with "everything in the universe can be defined as objects".
5
@thewhitefalcon8539 Actually all arguments are technically DI.
4
@NickBrown33 Please don't ever do that - not only it is slower, it is more confusing in code. Just use ifs.
3
@jordixboy I think you'll find it's usually OOP people who name things strangely to sound smart. FP people on the other hand are usually victims of names from mathematics.
2
@NickBrown33 "Another example would be sorting. There is no best sorting algorithm, they all have trade-offs. You could implement multiple sorting algorithms, each being a different Strategy, and use them interchangeable where they are most suited." This is the best example of how OOP contributes NOTHING. It is literally a johny-come-lately "let me help you organize your code" janitor paradigm.
1
@NickBrown33 "I'm not sure what the other responder is saying, because the Strategy pattern is in no direct way linked to "if" statements, and you will very likely use many fewer "if" statements if you are doing Strategy pattern correctly. " The other responder is precisely saying that doing it the way you described it is extreme overkill and non-performant and could be easily replaced by a switch statement or multiple ifs and it would be more readable and more performant.
1
Hahahah fake-strict languages I love it.
1