Let's face it, Object Oriented Programming is a failure...

Let's face it, Object Oriented Programming is a failure. Overall concept is just bad and I don't see any reason how it supperiour to functional programming. Java is dying, C++ is dying, OOP in Python is just a big clusterfuck. Sometimes I wonder how this man was ahead of time than anyone. Even if you want to go dumb OOP way, there are Structs in C for ya. C is so fucking beautiful.

Attached: download (5).jpg (208x243, 6K)

Other urls found in this thread:

github.com/carp-lang/Carp
unqualified-reservations.org/2007/08/whats-wrong-with-cs-research/
twitter.com/SFWRedditGifs

haskell master race
sage

Objective-C and Swift are doing gangbusters.
Maybe it's just Simula-type OOP that wasn't the best option.
Of course, it could be idiots trying to use OOP for stuff it's not adequate for. Like Bjarne itself advised against.

>Java is dying, C++ is dying,
Umm, sweaty....

Attached: Screenshot_2018-08-30 Github Language Stats.png (2720x800, 219K)

come home child... you are welcome here.

Attached: julia.png (280x180, 3K)

>I don't see any reason how
try stopping being a NEET and work for a large company, you will be praising OOP in no time.

>Java is dying
>C++ is dying
Bait

Attached: 1451378885235.png (503x595, 269K)

ITT: Cnile delusion

Is C even used outside of maintaining legacy codebase anymore? I mean, the language is so dead even it's compilers aren't self hosted anymore.

OO sucks because no one does OO correctly. This is because OO sucks so doing it correctly also sucks.

Proper OO requires very strict adherence to the "rules", and it also requires very prescient preplanning of your object hierarchy.

What almost always happens is, the initial structure of the object hierarchy is wrong, and a lot of code gets written. Eventually everyone realizes that the initial design was wrong, but rather than fix it, they resort to weird hacky work arounds. Eventually you start see seeing all kinds of anti-patterns crop up, and you end up getting a pseudotype system on top of the real type systems (e.g. "If this field is not null on Person object, do this, else do other thing").

Eventually everything regresses to having one big container object which essentially acts as a global state, and your type system stops being useful whatsoever. Now you just have standard imperative programming, but your logic is spread through hundreds or thousands of files, and the only way to determine behavior is to trace through it at runtime in a debugger.

retardation is hard here.

Did I say anything wrong? C is now an obscure language. Everyone moved to C++, even C compilers are written in C++.

C is fucking beautiful, it's my favorite language actually, but there is one case where I consider C++ superior and those are video games. Classes make it much easier to describe game objects.

So, for me it is:
OOP for video games, FP for everything else.

OOP is literally the greatest thing to come to programming.

Some of the object oriented codebases I've had to sift through are nightmare fuel. Inheritance trees 8 layers deep wasn't uncommon.

.t game dev freshman

Computational geometry is fuckton harder than anything average Cniles do in their entire life. No disrespect.

C doomed computing forever.

>imply game dev majors do computational geometry

>C is fucking beautiful
>FP for everything else

Attached: 1526219016285.jpg (588x823, 109K)

Tell us about Lisp. Tell us about the brackets.

ML is better.

>c level performance
>lisp level metaprogramming
>clean simple syntax
>no OO garbage
this

Jew language that is even worse.
>no static typing
>"powerful" macros that are only used to compensate the shortcomings of the language and make it unreadable
>impossible to create an executable without bundling an entire interpreter with it
>elitist community that created literally nothing with it
No wonder it failed. ML and Haskell are better.

>>no static typing
Not necessarily true.
>>"powerful" macros that are only used to compensate the shortcomings of the language and make it unreadable
I don't know why you put powerful in quotes. Your claim is completely untrue anyway.
>>impossible to create an executable without bundling an entire interpreter with it
Not necessarily true.
>>elitist community that created literally nothing with it
Demonstrably false.

There are too many brackets. I ain't writing all those brackets. Also one of the compilers is Jewish.

>no static typing
>Not necessarily true.
It is though.
>I don't know why you put powerful in quotes. Your claim is completely untrue anyway.
Show me a counterexample.
>impossible to create an executable without bundling an entire interpreter with it
>Not necessarily true
Show me a counterexample.
>elitist community that created literally nothing with it
>Demonstrably false.
Show me a counterexample.

Attached: 1516388574206.jpg (500x334, 21K)

The language's creator himself is Jewish my man.

github.com/carp-lang/Carp

you're right about "powerful" though, it's just bog standard ast manipulation

Yeah.

>github.com/carp-lang/Carp
>WARNING! This is a research project and a lot of information here might become outdated and misleading without any explanation. Don't use it for anything important just yet!
Can lisp be ever taken seriously?

>It is though.
Common Lisp has strong static typing if you want it. Then there's Typed Racket and even stuff like Shen.
>Show me a counterexample.
Pretty much any Lisp codebase, examples from On Lisp.
>Show me a counterexample.
Consider the Chicken Scheme compiler.
>Show me a counterexample.
Macsyma/Maxima (early influential CAS)
Remote Agent (JPL)
N-World, Mirai (graphics)

Lisp has had (and still has) a far larger presence in the industry than ML or Haskell. Not surprising, since it originates from pragmatic American academia, as opposed to European academia, which is obsessed with PLT metamathematics wankery and all that. Moldbug BTFO all those wankers already: unqualified-reservations.org/2007/08/whats-wrong-with-cs-research/

>I don't see any reason how it supperiour to functional programming
I see: oop is used in the real world, while fp os only used by NEETs.

>Java is dying, C++ is dying
If you really think this, I guess Jow Forums is the only place where you see people talking about programming languages.
Protip: Jow Forums is not the real world and neither is hacker news, try to get out of your own bedroom.

>c
>functional programming
NEET hipsters confirmed for not even knowing what fp is.

>Object Oriented Programming is a failure.
It is ubiquitous
>Overall concept is just bad and I don't see any reason how it supperiour to functional
programming.
FP is useless when you need to mutate state, and that happens almost everytime in regular programming.
>Java is dying
Not really, despite Oracle's best efforts
>C++ is dying
I wish it was, but we will always have C++14
>OOP in Python is just a big clusterfuck.
Everything in Python is a meme
>C is beautiful
We will always have C89

Attached: 17354647547354665736.jpg (675x601, 168K)

[spoiler]monads[/spoiler]

spoiler fail?

Or any software any company uses (Amazon, Google, Microsoft, Oracle, etc, etc)

I am about to start writing an antivirus engine for android av of a major company. I will write it in pure C as i did before.
Suck it oop fags

>unironically linking moldbug

> classes are just structs wit function pointers
> oop is imperative
Prove me wrong

>oop is imperative
Haskell is OO and not imperative. But they call their classes 'types' so that it doesn't look like they are OO or anything.

I don't particularly dislike OOP, but you're essentially correct.

type classes are nothing like oop classes

>Sometimes I wonder how this man was ahead of time than anyone.
He wasn't. A lack of features doesn't imply a plan to omit said feature.
Maybe BETA object orientation was a better option.
>dynamic multiple dispatch
this

Scala-style OO is the best.

>Singleton objects serve as namespaces/modules to organize your functions with
>If you need the same shared arguments for everything, make it a class with constructor args to make a parameterized module
>Constructor args are stored as immutable instance variables by default, like they should be in 99% of cases
>Simple data holders (case classes) with sane defaults for hash/equals/toString copy with modification

Too many functional languages get lazy about modules, you need them, objects give you that and sane code completion which is really underrated by functional autists.
The old-school OO where "Dog extends Animal" or whatever is garbage admittedly, but objects-as-modules is fine and you can do it in any OO language

Except the language itself is a mess and full of inconsistencies.

Did I say anything about the language as a whole? I said it's OO system is good. I think a lot of new languages like Kotlin and Swift borrowed it anyway, because it's good.

How is it a failure if it's making trillions of dollars?

OOP is, in my opinion, one of those things that are beneficial only in small, controlled amounts.
The way most Java projects do it, with a huge, bloated class hierarchy and a million 2-line functions that are only called once, is absolutely retarded and unmaintainable, and anyone who denies this has never worked on such a project.
There _are_ cases where they do make the intent clearer, for example, to logically group functions which always act on a certain data structure and modify its internal contents, most often containers. list.insert(element) is clearer than insert(list, element), and each internal state can be managed more easily by restricting the way it is modified.
But jamming everything inside a class for no reason, especially pure functions, just makes no sense. It adds unnecessary layers of abstraction that make the code harder to understand and to debug, not to mention that it leads people to waste time on noise like class hierarchies, relations, etc. while not actually giving enough attention to the problem the program needs to solve in the first place.

>bjarne itself
stroupsoup confirmed for reptilian

Fuck off. Dog extends Animal is about the purest form of OO you can find, and the use case that best fits OO.
It is using classes as modules and other contrived retarded uses what made OO look bad.

>bloated class hierarchy and a million 2-line functions
On the contrary, such projects use to have bloated flat hierarchies, or no hierarchy at all. You only find hierarchies in UI widgets library and other framework-ish libraries.

Short functions are a good thing, only that needing a class and an object to hold them is hyper-verbose. Java was born in another age, one where functional style was not mainstream. People came from C++ hell and they were finally able to provide functionality without blowing your leg on the process.

That's the purest, but also worst form. Prefer composition over inheritance.
By using non-interface inheritance, you are creating too much coupling between two data types.
>Short functions are a good thing
They are a good thing only if they form a conceptually distinct operation and are used in multiple places, for multiple purposes. Notice how I said
>that are only called once
which you omitted.
Splitting up a ~30-line algorithm in 5 subfunctions that are used there and only there doesn't in any way improve readability, and actually hinders it by spreading out the logic.

I'm just getting started with functional programming. When does it shines over imperative?

I used to use Maple for maths, now I use Sage.
I use python for basic scripts and for gluing things together (HTML requests + sqlite database + calling maths libraries + making nice plots)
I use C for linear algebra I want to run fast.

What can I improve with functional programming?
I'm starting Ocaml but I guess I'm also tempted by Haskell because I want to be part of the meme too.

>emoji programming
Why should I quit MATLAB's /boomer/ comfiness for Julia?

In this shit world we live in, people can make big bucks simply by stating simple or even obvious things in a serious enough manner. Remember "The Secret" and how it was just "think positive"? Well this whole circus around OOP is a big scammy way to say "inheritance".

>Dog extends Animal is about the purest form of OO you can find
Also completely useless for any real application. It was thought up by architecture astronauts with a boner for hierarchies, it never worked in real life.
Even if you made a game with dogs and cats in it, you wouldn't use inheritance that way. You would do something like make a "FollowScent" behavior module and stick it into the Dog prefab.

Hierarchies suck for the same reason that tree-based databases lost to relational. There are multiple valid hierachies and trying to force one ends up with a total mess.

Done that. Hate OOP all the more now. Fuxk c# and Java so much.

>functional programming master race
I deem this the funniest joke of the day.

>search "smalltalk"
>0 results
>no mention of smalltalk in an oop post
>nothing about how oop should have been

i thought summerposters were gone already

the truth Jow Forums will never admit is that C# is better than both C and C++

the truth is, that is not too hard

The more I code, the more I come to unironically believe that FORTRAN is the best language

assembly > fortran

forth > assembly

>not just being a cobol wizard with a starting salary of 200k and absolute job security despite doing trivial shit

Attached: codinggirl10.png (1366x768, 248K)

manually connecting the circuit paths together using your fingers as a conducting path > forth

imagining the circuitry and running a simulation in your head at light speed while at the same time doing the same program in lambda calculus to check > whatever you said

why wouldn't this be read in from a csv instead of hardcoded

Steve Wozniak sharpening a pencil > all

Everything is more comfy than Matlab

I've been programming for five years professionally and I have no fucking idea what OOP even is any more.

Nor even why it's a problem.

>Don't use it for anything important just yet!

wew

Has anyone here worked with CERN's ROOT framework? Then truly will you learn the horrors of poorly designed OOP

Interfaces and roles made OOP usable for me. That the OOP framework I use provides a ton of syntactic sugar that stays out of the way, helps me avoid boilerplate stuff, and genuinely makes certain things easier and more manageable. Also I don't force myself to use OOP where it isn't suited.

Yeah, I'm convinced that in most cases its better to just store an object of what you'd consider inheriting from as an attribute/property and just perform operations on that object in your class.

>FP is useless when you need to mutate state, and that happens almost everytime in regular programming
Functional concepts used in the context of a multi-paradigm language can affect from state.

This is why people hate OO. Composition and simply storing instances of other classes as members of your class is so much more useful and understandable.

If your program can reasonably be represented as an object heirarchy you probably have a brain dead simple program that could be written in literally any style without any problem.

For everything else, you actually have to get down into the nitty gritty and find out what makes sense (not OOP)

Good luck programming a game functionally.

OOP sucks because it can't be done "correctly" since it is merely syntactic convention at best and there is no syntax which can prove your program makes sense. When people then leverage OOP for dynamic programming they've basically done the biggest fucking abstraction inversion of all time, giving themselves all the usual headaches of dynamic languages along with all the usual headaches of typed languages and none of which proves their program is semantically correct.

Attached: 1534120366515.jpg (1000x1000, 59K)

Data-driven procedural code with closures >>>> object hierarchies

Maybe you can use objects for a component system if you want, but inheritance is garbage for a game just like it is for anything else. Also functional is fine as long as you don't go full autist and forbid mutable state like Haskell

You should really take the time to learn a lisp with a good macro system if you like avoiding boilerplate. I would be willing to bet you have no idea how much boilerplate you have in your "reduced boilerplate" code until you have the power of lisp macros at your fingertips. Even if you don't get into reader macros. In practice, overuse of lisp macros is a kind of source code encryption since such a huge reduction in boilerplate is basically a form of compression and then there's too much semantics packed into almost no syntax. We humans like a bit of redundancy in our communications. I think it lets the brain catch up with the eyes/ears.

t.script kiddie who never worked on a large group project.

Woah. Yeah, maybe sometime. I'm loving Perl right now and basically using it for everything so I'm already off the normal path. Might as well give it a try. I do have a copy at SICP at home that I gave up on reading in the days before I got my mental health together.

SICP doesn't teach macros, it's all runtime, but it's fun

>Computational geometry
what, so, loading a matrix library?

HEP please leave

I have been saying this since the 80s but people ignore me and talk over me.

I've never had a problem with it.
Why do you dislike it?
IMHO simple stuff in java is worse than ROOT from an end users perspective
Were you doing detector level stuff or something? For data analysis it was fine.

Clang is a meme
GCC has more Ada in it than C++
Your point?

>functional programming
for brainlets

Attached: SC_SCAM.png (224x250, 4K)

programming in matlab is not as comfy as in c but certainly comfier than programming in python

Attached: sip.jpg (1008x555, 103K)

>github
>sweaty

Attached: 640.png (288x415, 135K)

Attached: 1524902046667.jpg (400x300, 54K)

Billable hours