Ditch Your Favorite Programming Paradigm | Prime Reacts

117,127
0
Published 2023-05-06

All Comments (21)
  • @Xtermo
    Based and procedural-pilled take. OOP and FP are basically both attempts to make PP scale more nicely. Let us never forget that in the end, the core of programming is still PP.
  • @daniel-wood
    Videos about OOP that start with a description of classes, methods, and inheritance are the CS equivalent of starting an essay with "Merriam Webster's defines [essay topic] as"
  • “You wouldn’t want `address` to be public, since any other class would be able to access and change it.” immediately adds getAddress and setAddress methods as “best practice”
  • @atalhlla
    The perfect functional program accepts no input besides power and produces no output besides heat.
  • For me the question boils down to a few simple concepts, 1. The object-oriented paradigm revolves around passing data between unified domains, not necessarily "classes" or "structs". That means you send information back and forth and try to make each specific domain responsible for interacting with that dataset within that scope of states. 2. The functional paradigm revolves around making code immediately obvious in a declarative way, even if that involves using data encapsulation methods and the like. The code must read fluently and it must be immediately obvious the result of an expression not by an individual stream of parts, but by the complete expression (and, of course, it must be decomposable). 3. The procedural paradigm revolves around ordering things in a specific, controlled way, not through statements or units, but through small, specific, determined logical steps that must modify or change the data as they are performed. The scope of a procedural code is always linear and it must be possible to read and understand linearly. To that extent, I can understand that all paradigms employ common concepts and can be summarized to common notions present individually in each of them, but which are not immediately reducible to these, as a complex system. Each of them has its place and I can understand why multi-paradigm languages won and purely functional or purely object-oriented languages became less and less popular.
  • @capsey_
    9:42 fun fact, this code on the screen doesn't actually have any side effects. Python only assumes you use global variables when accessing, when assigning values it creates a local variable, unless you use global keyword
  • @IronEducation
    I almost spit out my drink at 'leave room for the Holy Spirit' and 'Fibonacci Indenting' 😂
  • @daveisradicle
    Anyone else make a bet with themselves how long it's going to take for the costco alert to go off and remind prime to turn off his alerts?
  • 14:06 You absolutely NAILED IT, I love this so much. That's exactly it. This is why I love your channel, thank you so much
  • 3 Space indenting is going to be my new styling guide. It is the informal acknowledgement that you don't care about the well being of others.
  • @star_man
    As someone who grew up with procedural programming before OOP truly entered the mainstream, it was interesting and slightly humorous watching OOP grow, suddenly OOP was considered the cool kid, your programming language wasn’t worth considering if it wasn’t object orientated, people couldn’t gush enough over it, it was new and trendy, everything HAD to be OOP, and the young coders were told OOP was like some god that had to be worshipped… now people are realising that while OOP has its uses, it’s not the all singing all dancing paradigm they were told, and can be a steaming pile of hot garbage.
  • @GmanGavin1
    14:23 yep, that was me. Until I started learning a little bit of Haskell I went "wait if this is rules of functional then what the heck is C" and that's how I learned about the "procedural paradigm"
  • @farqueueman
    I invented a new paradigm called HBO - hairball oriented programming. It consists of one flat function that does everything. Who needs global variables?! ♥
  • @SimGunther
    Here's my paradigm step by step: 1. Solve the problem with messy procedural prototype code 2. Find where the state can be localized and calculated as part of an idempotent function 3. Put const/final on everything I just added if the language is not const by default so I don't trip over myself changing something I otherwise shouldn't 4. See which state is forced to persist after the important function calls and turn those bits of state into a "fake continuation stack" aka internal localized state in an object
  • @grawss
    I made a full GUI, multi-option/filter database searcher as my first program. Super snappy, fun to use, it would search "name 04" if you typed "04" etc. It even searched as you type! I asked how I could improve, and they said my use of "goto" was frowned upon because it makes the code hard to understand. It was 1 goto in 46 lines of code with zero functions or classes. To replace it would require breaking the whole thing up into multiple functions which would then "goto" each other. That's my issue with this debate. Functions are just "readable" gotos, and classes are just "readable" functions, and inheritance is just "readable" classes, and programming languages themselves are just "readable" versions of other programming languages. Seems like we're forgetting how to read!
  • @sync9827
    Please keep doing what you're doing! I love your content!
  • @boredbytrash
    I hate this generation of devs. Everyone and their mom want to be come „dev influencers“ when they are obviously either just BAD at it, just graduated or are just repeating the bad Medium posts of others. Saying „public static final“ is a OOP pattern is so stupid and then continuing „now I want to show the beauty of FP, but I never used it so sorry I’m advance for my bullshit“ is so ridiculous. „Engineers“, we are laughing stocks
  • @nieczerwony
    Brian Will 7 years ago made a video on why OOP is not really OOP and ppl still discuss it.
  • @mamalinio
    I could not agree more with your last statement boy. You've got your self a new sub