I hate OOP

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.

Thanks.

Attached: oh.jpg (489x400, 56K)

Other urls found in this thread:

www3.cs.stonybrook.edu/~cram/cse526/Spring19/Lectures/untyped-lambda.pdf
youtube.com/watch?v=AbgsfeGvg3E
en.wikipedia.org/wiki/Software_crisis
en.wikipedia.org/wiki/Software_engineering#Subdisciplines
twitter.com/AnonBabble

brainlet

>FUCK objects and FUCK classes
maximum kek, image being so stupid that you can't understand compartmentalized relationships between variables and functions

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

Why'd you go to college anyways, you can learn programming at home.

Is this some OOP shill trying to make people who don't like OOP look stupid?

OOP is not difficult to grasp, try harder

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.

>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.

There's plenty of reasons to dislike OOP. It being difficult to understand, however, is not one of them.

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

misuse of the picture, linux kernel is riddles with OOP patterns

Yeah you can easily write your own class system and vtables in pure C

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!

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.

this is exactly what I think. I don't like OOP but this almost makes me want to do OOP

I've never had a need to use OOP explicitly, even in languages like Ruby. It's a pretty useless feature IMO.

it literally took me 5 minutes to get OOP.

types exist in functional programming too? fucking faglord

They don't need to! fart huffer

read, nigger
www3.cs.stonybrook.edu/~cram/cse526/Spring19/Lectures/untyped-lambda.pdf

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.

Personally I hate it, but I see why its used

Attached: 1531672071868.jpg (500x507, 35K)

but a computer has state user

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.

i'm not reading useless bullshit theoretical slides. give me concrete examples used in the real world or don't at all.

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.

I wouldn't even say its easier to read and write, just easier to manage.

Brainlet can't understand an industry standard programming paradigm.

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.

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.

Probably.

pajeet standard

>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.

Attached: tiersofargument.jpg (777x656, 79K)

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.

now add Satania on top of that

that would be, dare I say it; devilish

wtf I love animu posters now

Any lisp. Clojure is pretty useful, SBCL, Clasp are also noteworthy

t. never written any meaningful code before

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.

Computers very literally do not have state. It is an abstraction.

if OOP is so great explain why critical systems do not use it as well as any other fancy abstract concepts

>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.

Attached: herrderr.gif (194x191, 39K)

Only until you start messing around with concurrent programming. This is why the God Machine will eradicate us in the future - mutable threaded programming.

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

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.

Attached: 1544499020678.png (786x1197, 433K)

Complexity means less security and performance, but easier development

this has to be contrarian bait, nobody can be this retarded

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.

Nice bait mate

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])

don't underestimate an Functard

Or you could use Clojure's atoms, agents and refs to handle the disgusting stateful mess

how duz compooter wurk???

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.

very much not the simple RTM you're envisioning.

That's why I used distinct time user

we're approaching room temperature levels of iq

>i love functional programming. it takes smart people who would otherwise be competing with me and turns them into unemployable crazies
-William Morgan

We're doing our best to join you user, hang in there

Retard faggot

Attached: Screenshot_20190505-110312_Browser.png (1440x2560, 564K)

Daily reminder that both functional and object-oriented paradigms are correct and incomplete descriptions of reality.
Also use FORTH instead

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

someone get this hot-head out of here

agreed. all "pure" languages are trash.
that goes for "pure safety" too.

>brainless spouting off what you heard in class
That explains your choices. protip user, everything school tells you falls apart in real life

>Duude... The universe is a static fuuunction.... Functional programming will expand your mind man...

Sounds like functional programming causes brain damage

it literally works thanks to transistors being able to hold state

this

>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

>stack machine

Attached: 1497109683672.gif (160x270, 801K)

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 ).

So people came up with some important ideas (see: en.wikipedia.org/wiki/Software_engineering#Subdisciplines )

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

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

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

I'll stack this machine right up your butt if you're not careful, user ;)

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

Asshole level correction with irrelevant fact: MOS transistors can hold state as they have gate capacitance.

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.

>what are registers

brainlet

>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.

>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

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.

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.

HOLY shit, this is the first time I've actually felt superior in a programming thread. thanks user. nice 6 grand too.

>Javascript is a Lisp dialect

I DARE you..

Dubs say I can convince OP to love OOP

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

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

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

>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?

that's a fair argument, at least.
but also, browser-based everything was a mistake.

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.

Ahahaha..


Mr. Wittgenstein would like to have a word with you.

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.

> If you know the story of Leiningen vs. the Ants, it should give you a hint as to which problem Lein solves

Try to make the world burn..?

>mr user, see me after class

Attached: wittgenstein.jpg (701x559, 55K)

Defeat Ant, obviously. And Maven and all the mess involved with everything related to a language which transforms XML to stack traces