General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
ThePrimeTime
comments
Comments by "" (@jboss1073) on "Functional Programming IS NO BETTER than Object Oriented Programming | Prime Reacts" video.
Not true. Lisp matches what Lsip machines actually execute (as they have CPUs made to run Lisp natively at the die level).
25
Please disregard most of what that guy says. He is an old-school guy who repeats what he was told. He could not properly define OOP if you asked him. I doubt he knows who Luca Cardelli is.
25
@SimGunther "If-Then-Else and functions are just an abstraction on call/jump/branch/ret instructions in assembly code." That is often said but it is not true. Inside the JUMP function of the CPU, there is already an if-then-else there - all programmers do is "recover" it to work with it in high level languages. So if-then-else is not an abstraction but actually implemented in the CPU at a LOWER LEVEL THAN JUMP.
17
@monad_tcp "what, that's not how CPUs execute JMP , there's no 'if-then-else" there, WTF A JMP only checks some flags (usually the ZF, Zero Flag, which is the status bit result of compare gt/lt/eq/ne) and then it rewrites the IP (instruction pointer) register conditionally on the flags, its more like a pure ternary operation that results in the register being modified to have either the same value or the operand based on the flag. " So to paraphrase you: "A JMP checks some flags... and then IF SOME CONDITION IS TRUE THEN it rewrites the IP register CONDITIONALLY". Hence you've proven my point: JMP is implemented on top of a more general IF-THEN-ELSE that is UNDERNEATH the JMP in the CPU.
12
@monad_tcp "Its only OO that's absurd and isn't equivalent to any of those two formal models. Even worse, OO isn't actually formalized (yes, I know about Modula-II, It failed at formalizing it)." OO is formalized (see Luca Cardelli's work) but since Objects turned out to be Comonads nobody gives a crap. OOP programmers were hoping their theory would be made solely of rainbows and unicorns and none of that stinky math.
10
@NorbertNemec No, it does not. Pointers are still part of procedural programming.
7
@monad_tcp "FP is an extension of procedural. In fact imperative and function code are equivalent. Because Lambda Calculus and Turing Machines are literally equivalent." All of this is false. For one, Turing Machines accept the Law of Excluded Middle in Logic, whereas Lambda Calculus specifically does NOT WORK with the Law of Excluded Middle - you have to delete that law first, in order to arrive at what is called "intuitionistic logic" or "constructive logic" which is where Lambda Calculus makes any sense.
5
@carlsjr7975 Exactly that. Few know this. OOP was created strictly for simulation. It was not ever meant for "general purpose". Of course this guy (the old guy) doesn't know this or care.
5
@monad_tcp Now that you've explained your point about pointers (pun not intended) I think I agree with you.
3
@carlsjr7975 Yes, it was in the name!
3
@sk-sm9sh You are being very childish. Proving your program's types is the only way to know it works correctly. If you're not using FP but are writing Unit Tests you are wasting your time due to your own ignorant attitude.
2
@KonradGM Use a global.
2
@curlyfryactual " like I said, a global is just a poorly implemented object. " But it's not, and no serious Computer Scientist would say that. A global is just a variable - an address in memory with some room for you to store some bytes. An object is a closure over methods and attributes plus a virtual table. In no way can you say that "a global is just a poorly implemented object" as those two things have nothing in common with each other. Globals are not objects. Not even poorly implemented ones. They're just not objects at all. "because a global is already the enemy of concurrency. " WRONG. If it is a Mutable Transactional Variable made global then it is concurrency-safe and parallelism-safe. You are having this newbie mindset that "globals" are just what you learned, but that's not true. Many things can be global, including concurrently-safe transactional variables. In fact, that is how it is done in the industry. "I work with enough "procedural with globals" architecture these days, and it's simply a pain. It is no easier to parallelize the execution of it; in fact, far worse." That is because you are ignorant of the existence of transactional variables. You shouldn't just make a value globally available in a global variable without putting it in a Software-Transactional-Memory box. Look into Clojure, all the globals are parallel-safe and concurrent-safe. "I love declarative code as much as the next guy. Plopping in a global is certainly not that." This discussion is not about "declarative code". But even if it were, Haskell is transactional and they have concurrent-safe globals too just like Clojure. It may be only the stinky language you're using making you believe globals cannot be concurrent-safe. Not true. "May as well do it right." Throughout your answer you have demonstrated you do not have the sufficient Computer Science knowledge to do anything right. God help your clients.
2
@sk-sm9sh I know it's hard to accept but it is true. Read the history of Computer Science. OOP was very much considered synonymous with "agent behavior modeling" when it started and for many years. OOP has no theoretical basis (that people care about; I'm aware of Luca Cardelli but the end result of his OO algebra is so similar to FP that the author himself compares the two styles in his own Obliq language in almost every example!) and most of the needs of OOP programmers can be satisfied with proper closures. Inheritance itself, a defining characteristic of the "far away from the original" OOP of recently, has already been demonized by some of OOP's own proponent included the creator of C++. Many now recommend composition instead. Composition is an algebraic concept very popular in FP.
2
@monad_tcp I know how call/cc can be implemented easily with CPS without JMPs. Your point?
1
@monad_tcp When did I say all languages have pointers?
1
@curlyfryactual The question was: "I'm curious, how would Procedural be utilised in situations where you need to have a somehwat constant state that you need to mutate? I realise it's different in WebDev World, but for something like GameDev?" For GameDev, you most definitely want to use a global here. There is no alternative that is more performant.
1
@curlyfryactual Objects are actually the enemy of concurrent and parallel access, so you are actually working against your goals by using an object. There is a reason OOP is falling out of favor in the industry, and it is because it doesn't scale past one CPU core.
1
Immutable data structures don't need to make a copy to make a change.
1
@sk-sm9sh "it's an evolving field" is a nice way to say "it has no practical foundational basis". In other words, it's winged, based on what scammers can sell to gullible people that year. I'll stick with FP which is a real thing with a real theoretical basis and many mathematicians behind it.
1
@sk-sm9sh Yes, it's called Category Theory, and it informs Haskell - look at its libraries and you can see they are basically references to Computer Science by carefully dissecting and typing every operation of every library. More generally it's called Constructive Mathematics, the kind that dismisses the Law of the Excluded Middle and makes things either be true, false or bottom.
1
@zacharychristy8928 "this' what? What do you find absolutely possible with procedural programming as well?
1
@zacharychristy8928 Got it, thank you. I don't think Procedural can get as messy as OOP with its design patterns (implicit knowledge) and Windsor Castles and so on. But I agree complexity is a function of the programmer. The paradigm gives the programmer more or less rope to make their programs complex.
1
@zacharychristy8928 " it's tough, because if you're going to add the caveat of "with the right design patterns" or "when done correctly" you eliminate a lot of what both sides would consider valid examples of the paradigm being bad. " HUH? Read again, I was saying that design patterns make things more complex. I don't believe they can be done right. There's no theoretical, mathematical basis for them. I believe they are a scam. Re-read my answer. I said OOP has too many hoaxy fads that make it thousands of times more complex than procedural could ever be.
1