[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I don't understand object oriented programming. Functional

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 3

File: download.png (7KB, 254x199px) Image search: [Google]
download.png
7KB, 254x199px
I don't understand object oriented programming. Functional programming was so easy to learn. It was intuitive and mathematical. But OOP is so much more contrived. I have failed to even see the point so far. It just seems to be like OOP is just compulsive organisation autism manifested in code.

I've only been using programming for mathematics, though, so maybe I'm biased. The only reason I would even bother with Java instead of Haskell or Python or even C++ is that Java is so much faster.

Anyone have any tips for grasping it more easily?
>>
Think of every object as a type of variable and
Think of methods as a group of functions based around manipulating this type of variable..
>>
>>62078374
i feel you senpai
i get infuriated when i need to use a perl module and the only interface to it is object oriented
>>
>>62078404
This one.
Don't overthink what object is.
>>
File: help.png (82KB, 255x250px) Image search: [Google]
help.png
82KB, 255x250px
>i'm too stupid to learn arrays and pointers
>>
>>62078416
hold on i didn't write 'senpai' in that reply
does 4chan automatically change 'f\a\m' into senpai now?
senpai
senpai
>>
>>62078429
baka desu senpai
>>
>>62078404
Yeah, thats fair enough, but what kind of function permits the changing of its own argument later in the code? Why bother with all the added syntax of creating object types and all that shit when you could just as easily do the same thing with a lot less effort with functional programming?
>>
>>62078452
The basic idea is that you want to create an interchangeable thing that can be replaced, reused and only needs to be modified at one place.
>>
>>62078374
I learned java first and OOP is the only kind I know. What do you find so confusing about it?
>>
>>62078374
>I've only been using programming for mathematics
lol

yours is a surprisingly common plight my friend
>>
OOP is a good idea that was overused to the point where it has become a shitty meme.
>>
>>62078374
what's hard to understand about OOP?
>>
>>62078429
how fucking new are you?
>>
File: IMG-20170824-WA0026.jpg (20KB, 625x626px) Image search: [Google]
IMG-20170824-WA0026.jpg
20KB, 625x626px
>>62078374
>is that java is much faster
>>
>>62078429
desu t/b/h
senpai f/a/m
baka s/m/h
>>
I've always had an issues to see when the object gets copied in OOP ans thus what's shared. Thread-safety is also hell. I really love what Go did.
>>
>>62080337
Most OOP languages just make everything reference types.
I never really liked that idea.
>>
>>62080259
It was an order of magnitude faster than C++ for finding primes, despite using the exact same implementation
>>
>>62078428
What is so mystical about arrays
>>
>>62081519
(you)
>>
>>62078490
Organizing files properly on functional programming also acomplishes this. Not that I have anythig against OOP
>>
>>62078374
It's all the same thing in the end. In functional you'll keep state as input argument to recursive functions or similar. In OO you'll put it as members in some syntactical-sugar construct called a class. I really don't see why this is such a big deal to some people. What sucks is bad, unreadable, unorganized code, which is trivial to produce in any language.
>>
>>62078374
desu
>>
>>62078374
>t just seems to be like OOP is just compulsive organisation autism manifested in code.
That is pretty much what it is.

>I've only been using programming for mathematics, though, so maybe I'm biased.
Not biased so much as underexposed. Mathematical programming tends to be short and sweet, because the underlying mathematics is short and sweet. Software that does mundane user-facing things, like a text editor, or a game, or an office bookkeeping thing, consist of vast amounts of interacting crap. Compulsive organization autism is necessary to make sense of it, and OOP is a tool for doing so.
Thread posts: 25
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.