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

Why does /sci/ hate OOP so much?

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: 20
Thread images: 3

File: idris.png (2KB, 190x88px) Image search: [Google]
idris.png
2KB, 190x88px
Why does /sci/ hate OOP so much?
>>
>>9087883
Ontological Omega-reduction Proof?
>>
>>9087883
Object Oriented Programming?
>>
>>9087893
because of C++ and Java brainlets
>>
File: 1458462309327.png (116KB, 867x436px) Image search: [Google]
1458462309327.png
116KB, 867x436px
>>9087924
>implying c++ programers don't use oop
found the pajeet
>>
>>9087883
There is nothing wrong with OOP per se. Meaning subtyping, encapsulation and associating procedures with datatypes.

The problem lies in that students and substandard who've never worked on or written a large scale project before are being told that's the way to do things. They're being taught all kinds of "patterns" and "programming rules" on how it's supposed to be done, that these practices will improve code maintenance and readability. As anyone who has worked on large Java, C# or other OOP code bases can tell this is absolute bullshit. The more layers of abstraction you write the less clear your code becomes and the more you need to maintain.

The second problem is in the flawed mental model it teaches. It teaches us to think in terms objects that are abstractions of real world things with actions attached too them. Does a chair need to inherit from furniture? Does it need a sit method? Or does the sit method need to be part of Person? Ect... Seriously Java, does everything really NEED to be an object?

I've seen people go far into the rabbit hole with this, unnecessary inheritance structures, encapsulating data only to write routes around it, hours wasted in writing nothing but getters and setters, refactoring code a hundred times because they mental model of OOP conflict on how the objects need to be set up... It's endless.

Sometimes all you need is a simple function and data structure. And that's how we should teach programming. Work your way up to objects and patterns rather than using them as a starting point.
As a side effect it will also make learning programming much easier, because newbies don't have to juggle with retarded concepts and mental models.

Make programming about algorithms and data again.
>>
>>9087962
You have no idea what this threads about. lul
>>
>>9088048
It's just /g/ay programming stuff.
>>
>>9088055
haha you're a brainlet
>>
>>9087883

OOP isn't programming at all, its data entry
>>
>>9087883
Idris is prettysweet, we've been trying it and ATS out in small scale at honeywell. We're still on haskell and ocaml+coq though. Framac is sweet as fuck.
OOP is bollocks though, absolutely horrendous way of designing a realtime system (even soft).
I like the new fad of data oriented that's been gaining strenght in gamedev for years now. It's more natural to think about software systems in terms of data transformation, makes it very easy to analyse it with temporal logic.
>>
>>9087998
This.

In addition, OOP often indirectly costs a lot of processing power because of recycled code. A lot of scientific computation can be drastically optimised by using data structures and algorithms tailored for the task. As an example, the C++ standard library containers, such as std::vector and std::map, are meant for general usage, and simply knowing approximate bounds of the model being computed allows for a lot faster methods.

In short, you have to know what the classes are doing anyways, so trying to hide them can be counterproductive.
>>
File: haskell.png (24KB, 1200x847px) Image search: [Google]
haskell.png
24KB, 1200x847px
functional programming masterrace coming thru.

No but seriously, I don't program in Haskell, and don't do purely functional stuff. I just write functional code where I think it calls for it, and do OOP in some places (and even good old procedural sometimes, where it makes most sense).

OOP is not a panacea (nothing really is), but when done well, there are certain problems for which it is a very good paradigm to model things.
>>
>>9089001
well you definitely should prefer std::unordered_map whethever possible, but I can't really think of any way you could optimize std::vector in some special case. That class is basically just a wrapper around c arrays. It is as bare-bones as it gets
>>
>>9089044
If you know the maximum size of the mathematical structures (e.g. matrices, graphs) you are working with, it's faster to simply allocate the arrays from stack. I think it's common that mathematical libraries offer heap-allocated containers, but instruct to use stack if possible.
>>
oop these days sucks
its like when you need to hammer a nail so you grab a thrice gift-wrapped hammer and it kind of works but when the hammer breaks you unwrap it only to find it was never a hammer but actually several dead squirrels shaped into a hammer
>>
>>9087924
Just Java brainlets.
Cpp kiddies are okay, for the most part.
>>
>>9087998
Ive seen 600 lines of code with 20+ modules become compressed into a mere 4 lines and no classes or modules whatsoever.
OOP is abused and creates dusgusting networks.
>>
>>9089293
Wtf? If that's the case OOP probably isn't your main problem
>>
>>9089404
not that guy but i think a majority of people who have a problem with OOP don't really have a problem with OOP as much as they have a problem with the people who abuse OOP and the people who adamantly claim OOP is the only proper way to program
Thread posts: 20
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.