Shitheads invented this arbitrarily complicated system to sell courses becauce nobody can understand this cockfuckery without studying it for minimum of 5 years while wasting their money and time. FUCK objects and FUCK classes. The cancer of programming.
>FUCK objects and FUCK classes maximum kek, image being so stupid that you can't understand compartmentalized relationships between variables and functions
Jace Richardson
Ask me how I know you're a freshman brainlet that went into CS to make (((gaymes))) but it's not what you thought it would be Run while you have the chance, kid
Jayden King
Why'd you go to college anyways, you can learn programming at home.
Brayden Walker
Is this some OOP shill trying to make people who don't like OOP look stupid?
Jackson Reed
OOP is not difficult to grasp, try harder
Jose Phillips
Classes are just structs where the functions a members of those structs. Polymorphism is just function pointers. If you ever used a struct with a function pointer, you used OOP. Now KYS, you C hacker syndrome retard who never wrote anything more than a toy program to impress Jow Forums.
Cameron Morgan
>OOP is literally an easy to understand Lmao you future ""gaymer"" """"developer"""" are going to kill yourself when you reach Data Structures and you can't even grasp OOP now.
Jayden Long
There's plenty of reasons to dislike OOP. It being difficult to understand, however, is not one of them.
Thomas Bell
the simplest test to spot brainless retard who just sheeply goes with crowd of similar retards and hate on OOP without any understanding of anything is to simply ask them to explain what OOP is there is criticism to almost everything, but that doesn't mean everyone who criticizes is right
Jeremiah Ramirez
misuse of the picture, linux kernel is riddles with OOP patterns
Grayson Roberts
Yeah you can easily write your own class system and vtables in pure C
Logan Williams
not quite. classes are pairing of a struct definition, and a struct whos members are the methods which may be applied over those structs. could you imagine copying out all the call pointers for every single allocated struct? yikes!
Joshua Gray
OOP causes brain damage. Functional is the future. Types are a mistake, encapsulation is a mistake, management is a mistake, state is a mistake. There is no state. The universe is a static function which is a closure over itself, the next state is itself applied to itself. Everything can be described as a recursive process given initial conditions. there is no state.
Nathaniel King
this is exactly what I think. I don't like OOP but this almost makes me want to do OOP
Dominic Phillips
I've never had a need to use OOP explicitly, even in languages like Ruby. It's a pretty useless feature IMO.
Gavin Gray
it literally took me 5 minutes to get OOP.
Alexander Torres
types exist in functional programming too? fucking faglord
Its actually designed so literal brainlets can use better programmer's code. And to enforce standards so brainlets can't fuck everything up with random nonsense.
Its mediocre, but the point of OOP is essentially to force people to program in a certain fashion thats beneficial for large corporate projects where people aren't at a similar skill level and may not have communication with one another.
good way of paraphrasing that it is more manageable. it's just easier to read and write, and that means a shitton on any large project, corporate or not.
Tyler Parker
i'm not reading useless bullshit theoretical slides. give me concrete examples used in the real world or don't at all.
Ethan Peterson
lambda calculus provides a proof of computability. ie, it can tell you when the retarded thing you're attempting to do can be done better or not at all.
Jaxon Ward
I wouldn't even say its easier to read and write, just easier to manage.
Jaxson Taylor
Brainlet can't understand an industry standard programming paradigm.
Brayden Lewis
OOP is communism. There's some vague idea of a utopistic form of "true" OOP but in practice it always changes to something else, then becomes an unsustainable mess but OOP advocates retort by saying that wasn't true OOP.
Nathaniel Brown
you can jump into an OOP project anywhere, and quickly grasp what's going on locally without having to understand what everything- the whole project- is doing. It is manageable, of course, but that is a byproduct. You're trying desperately to pin a "dood it's corporate, it's got management n shit" badge on it.
Christian Thompson
Probably.
Kayden Gomez
pajeet standard
Owen Cook
>could you imagine copying out all the call pointers for every single allocated struct? yikes! you can do what majority of languages with polymorphism do interface is just struct with function pointers that take void pointer as first argument if struct A implements an interface then there is a static instance of this interface struct filled with function pointers on methods of struct A (takes pointer to struct A as first argument) function that takes a polymorphic type takes 2 pointers: void pointer to some instance and pointer to interface struct
You don't copy any function pointers all over the place and you don't have the function pointers embedded in the same struct as your data. there is only one instance of the interface struct per type that implements it. What languages with builtin polymorphism do for you is to provide syntactic sugar for methods, do some name matching to generate the interface and casting to polymorphic type so programmer doesn't have to insert it every time.
But that's what management is. In terms of actual writing and reading structure though its not that much better than say functional programming. I could just as easily jump into well written C code and search for functions as I could search for objects and their methods. The difference is you don't have to worry about OOP standards while doing functional programming.
But personally I find it far easier to search for functions, than to look in 20 different objects, trying to find where the SizeOf() method got changed.
Ethan Cook
now add Satania on top of that
Jacob Moore
that would be, dare I say it; devilish
Gavin Smith
wtf I love animu posters now
Sebastian Perry
Any lisp. Clojure is pretty useful, SBCL, Clasp are also noteworthy
Gavin Watson
t. never written any meaningful code before
Luke Barnes
Yea adding more baggage and shit around solving a problem makes everything more easy to understand. It's also good to encapsulate absolutely everything so the only way to interface with your blackbox library is to wrap it with your own blackbox library. Then before you know it you've got 20 wrapped libraries and nobody can manage the ridiculous complexity without spending 5 hours in an IDE to debug a simple fucking issue because theres some much code used to plaster over shit nobody understands.
Just solve the fucking problem. Just solve the fucking problem. The best code is the code that solves the problem in the most direct possible way with the minimum amount of bullshit and that's where OOP fundamentally fails.
Robert Hall
Computers very literally do not have state. It is an abstraction.
Jack Edwards
if OOP is so great explain why critical systems do not use it as well as any other fancy abstract concepts
Jackson Baker
>quickly grasp what's going on >with the global mutable state
OOP kiddies, don't try stealing what is good about Functional languages. Your shit is incomprehensible in a large project.
Only until you start messing around with concurrent programming. This is why the God Machine will eradicate us in the future - mutable threaded programming.
Samuel Walker
typical safety cases which most OOP languages don't account for, same way languages like C don't account for them. Hence why critical systems are all Ada lmao
Levi Gray
I didn't really like classes and objects either so I went into embedded programming. Now everything is structs and enums and I'm much happier.
Complexity means less security and performance, but easier development
Gabriel Gray
this has to be contrarian bait, nobody can be this retarded
Lucas Anderson
threading is a mess, but I've an idea for a language where type encapsulates some element of location; and different threads have different locations.
Matthew Ross
Nice bait mate
Luis Gutierrez
Thank you for bringing it up is right, the CPU looks like the most stateful thing in the world, but it's a frozen function. let S be the CPU's state at time T, X[T] the input to the machine at time T. S[T+1] = F(S[T], X[T])
Michael Miller
don't underestimate an Functard
Charles Moore
Or you could use Clojure's atoms, agents and refs to handle the disgusting stateful mess
Grayson Morgan
how duz compooter wurk???
Nolan Bailey
can't wait for you to start issuing instructions between clock cycles. when you're working in a computer's environment, time is discrete. face facts.
Lucas Collins
very much not the simple RTM you're envisioning.
Alexander Thompson
That's why I used distinct time user
Isaac Hall
we're approaching room temperature levels of iq
Blake Carter
>i love functional programming. it takes smart people who would otherwise be competing with me and turns them into unemployable crazies -William Morgan
Daniel Jenkins
We're doing our best to join you user, hang in there
Daily reminder that both functional and object-oriented paradigms are correct and incomplete descriptions of reality. Also use FORTH instead
Oliver Parker
why, because I quote a tweet I heard about inna lecture? Didn't know about the bit where FP is vindicated, so suck a bag of dicks user. A day without State is coming
Jordan Perez
someone get this hot-head out of here
Nolan Powell
agreed. all "pure" languages are trash. that goes for "pure safety" too.
Asher Powell
>brainless spouting off what you heard in class That explains your choices. protip user, everything school tells you falls apart in real life
Leo Sullivan
>Duude... The universe is a static fuuunction.... Functional programming will expand your mind man...
Sounds like functional programming causes brain damage
Sebastian Wood
it literally works thanks to transistors being able to hold state
Charles Jenkins
this
Jason Garcia
>School user I work programming in Clojure I was referring to a lecture by Kevlin Henney example, not directly related to this thread: youtube.com/watch?v=AbgsfeGvg3E I really love FP so I enjoy shitposting a bit about it, but I mean 80% of it
I assume this this is bait. But since you had those magnificent trips, I'll reply.
Where to start? If you write programs of a certain size/complexity you have to break it down or you will have an unmaintainable mess (see: en.wikipedia.org/wiki/Software_crisis ).
But there are only so many ways to achieve things. So eventually there are more or less two big schools of how to make software:
1) The functional approach. You have immutable data structures and you programms operate on them. Pro: Immutable data structures prevent many errors (i.e. race conditions) and make it easy to extend your programms, since side effects are (almost) non existent. Con: If you have to change or adapt your data structures you're shit out of luck. This means you have to refactor or even rewrite more or less everything.
2) The object oriented approach. This means you put small chunks of data together with algorithms to operate on them. To prevent mistakes you try to encapulate as much as possible, leaving only necessary interfaces for the "outside" to interact with those objects. Pro: If you have to maintain many states at the same time states (i.e. crucial for games) OOP is gold. Con: For concurrent processes you have to do a lot more mental gymnastics (i.e. semaphores). Also typical OOP programms tend to have more overhead and are typically a lot more verbose.
Which one is better? You have to learn and understand both approaches. Only then you can understand the brilliance and pitfalls of each of them.
Recommended Reading:
Functional programming >The little schemer >Structure and Interpretations of Computer Programms
OOP >Design Patterns: Elements of Reusable Object-Oriented Software >Clean Code
Oliver James
Transistors don't hold state, if they did they'd stop working. Memristors hold state. Transistor memory is implemented by a positive feedback loop which gets a kick in the nuts to change the recurring value >literally 2 NOT gates in a loop
Sebastian Howard
one thing lacking in this post is referring to anything related to using FP to build complex systems and solve "real life" problems. I don't know if there are plenty of good books on the topic. Also, if your FP language supports associative data structures and is dynamically typed, it's easier to adapt
Jaxon Bell
I'll stack this machine right up your butt if you're not careful, user ;)
Anthony Wood
Nigga OOP is meant to be simple. I know that this is your second semester in uni and after doing some sorting algorythms in C you are now studying java and it confuses you because you have to use setters and getters, but in the long run OOP makes complex programs piss easy to write at the price of optimization Thats why modern programs eat up 100 times the resources to have half the performance
Ethan Foster
Asshole level correction with irrelevant fact: MOS transistors can hold state as they have gate capacitance.
Kevin Jackson
Well, SICP teaches you to write your own compiler. Isn't that "complex" and "real life" enough for you?
On a personal note I also think that good langauges allow you to use both approaches when you need to. That's the beauty of LISP, C++ and (all memes aside) Ruby - no matter if what approach you want, it has your back.
Isaiah Myers
>what are registers
Isaiah Bennett
brainlet
Jace Wood
>OOP is meant to be simple. It was, in Alan Kay's original concept. C++ is OOP in the same sense that Javascript is a Lisp dialect.
Isaac Fisher
>Thats why modern programs eat up 100 times the resources to have half the performance disagree, that's a result of bad design choices than programming language choice
Zachary Lee
If you consider capacitors stateful, then sure. I analyzed them transiently, as transfer functions, and statically. Doing transient analysis of something like 2 gates in a row is a pain in the ass and yes, some transistors have higher voltages for a time. You can call it state, and physics might even define state equations, something like s'(t) = F(s(t), x(t)) but I don't see state here, only functions bounded pure functions in a closed positive feedback loop Compilers are cool but they don't have to live out in the wild, so to speak. A compiler is a pure function. Have you tried Clojure, user? It's not a cult, I promise.
Levi Hernandez
As soon as you have a clock rate you have a state. It doesn't matter how the state is represented, but fact of the matter you have a well defined albeit complex state which could be saved and identically recreated within the same or other systems.
Evan Adams
HOLY shit, this is the first time I've actually felt superior in a programming thread. thanks user. nice 6 grand too.
Michael Flores
>Javascript is a Lisp dialect
I DARE you..
Luke Roberts
Dubs say I can convince OP to love OOP
Daniel King
I don't want to reduce it to the analog level but why does clock rate make state? I didn't say you can't represent it all as a stateful business, either. You can always take a slice of the recurring process and call it state, but I'm not convinced it's state anymore than sticking feathers on a man makes him a chicken Holy shit user keep going
Colton Reed
This is kinda what i meant, once a developer doesn't have to worry about data structures and ad-hoc solutions because there is a generic object to do that, that developer tends to become lazy
Hunter Turner
ok user, the dubs have spokane. so, OOP is the only logical approach to programming because look around you. Everywhere there are Objects. Objects are the way the world works. the way your body works. Discrete, modular units that perform a specified set of tasks. You can use these objects any way you want. You can use a chair to sit on, but not a Steel Spike. Hence each object belongs to it's Class/Category as you would find on Amazon. The OOP theory is merely modeled around the Real World/Universe, even your own body is modularize into objects. To say "screw OOP" means "screw reality and the known world, the concept is retarded" This isn't much but at least it should make you hate OOP less as a concept, hopefully
Daniel Davis
>Have you tried Clojure, user?
Clojure is very sexy. I dabbled in a few tutorials and such things. I'm not sure about what to think about "Leiningen" though.
Unfortunately my work is mostly ugly languages, best thing so far was Python (sigh). I still have this dream to make a website in Lisp Flavored Erlang one day, lel. But maybe my way will guide me to Clojure one day, I heard great things about "Ring" or what was it called?
Cameron Robinson
that's a fair argument, at least. but also, browser-based everything was a mistake.
Adrian Phillips
I'm not OP but I have to say I'm not sold. If anything, you make an argument for types, maybe for interfaces (like in Go). I don't think you made the case convincingly. Moreover, can't you define interfaces, i.e. behavior, purely in lambda calculus? like pair can be defined in terms of what it will return when you apply first to it? Lein is good. It's sort of like sbt, but less messy. If you know the story of Leiningen vs. the Ants, it should give you a hint as to which problem Lein solves. Its config is just a static def. Pretty simple and readable. Try selling Clojure in your workplace not as a FP, but as a JVM language which is excellent for concurrency. Ring is pretty dope for web handlers.
Carter Roberts
Ahahaha..
Mr. Wittgenstein would like to have a word with you.
Sebastian Roberts
I understood OOP when I was 14 years old, you're just an idiot. The problem with OOP it forces you to write boilerplate for no benefit, inheritance sucks, and it makes your program slower. Computing has nothing to do with your body or chairs you fucking retard. Computing is transforming input into your desired output, pretending your data and functions are owned by an imaginary noun doesn't help that.
Matthew Moore
> If you know the story of Leiningen vs. the Ants, it should give you a hint as to which problem Lein solves