Why do corporations still shill OOP?

why do corporations still shill OOP?

Attached: file.png (736x736, 514K)

Other urls found in this thread:

web.cs.ucdavis.edu/~filkov/papers/lang_github.pdf
twitter.com/SFWRedditVideos

idk but my brother keeps shilling Scala to me

Scala is dead and has poor interoperability with existing Java libraries.

That's a stupid picture.
Java has flatmap.

Based brother. Mine converted the other family members into MacBooks iPhones and iPad.

This is an old picture.

Scala-like flatMap was added on Java 8 irc. Also a lot of Java 8 FP stuff was directly inspired and designed by some of the people that worked in Scala.

I am a lead engineer at a top 100 ad tech company. My team uses Java and scala. Scala is pig disgusting but we still use it for Spark. It has some nice features, but too much syntactic sugar which creates hard to read code. Code clarity is so important in large teams and large codebases that we will often choose slightly unoptimized but clear code over highly optimized messy code

Kotlin or Java. Scala will become Java2 soon.

>too much syntactic sugar
that's Java
import java.util.*;
class FizzBuzz
{
public static void main(String args[])
{
int n = 100;
for (int i=1; i (i % 3, i % 5) match {
case (0, 0) => "FizzBuzz"
case (0, _) => "Fizz"
case (_, 0) => "Buzz"
case _ => i
}).foreach(println)

Both are nigger languages just give me x86-64 amd assembly and I will be fine

Scala is nice but the dependency hell fucking blows my mind. I have so many issues with Spark breaking because I used the wrong dependency version.

Man of Truth.

The scala one is too compact. The patterb matching is good tho

Not the person you are responding to, but have you worked in a large group? Scala is more difficult to read for sure. Readability is crucial in large projects.

I know nothing of Scala, but I can intuit that the case constructs have 0 represent a match and _ represent no match, but I'm curious why the 0 represents that? Does it work like, a non-empty identifier indicates a match, otherwise no match?

> _ represent no match
No, it represents the wildcard "anything here".

>0 represent a match [...] but I'm curious why the 0 represents that
Because *if* it's the result of i%3 or i%5, respectively, the topmost respective case clause matches and "activates" what's after =>

Obviously the last catch-all will match anything that wasn't matched otherwise and just print i.

How?

Dependencies [of dependencies] are supposed to be resolved automatically with sbt, mill and friends, and the person preparing/updating a project in a team will essentially configure them for everyone collaborating on the project anyhow.

It's because OOP lends itself more to a cycling development team. It's easier to replace developers working on OOP projects. OOP in its current state is literally a way for corporations to throw devs out like used tissues.

C# is Java2

I don't really know much about functional programming / syntax outside of Linq with C#, but I do have to say that Scala syntax is compact and asthetic af.

However, I think it would be insanely hard to read and would become a nightmare in a large project. Idk, maybe not.

Any nigger can make some nigger feature.

Java, Scala = niggerlicious
x86-64 amd assembly = divine intellect

>How?

Well I used Maven first of all but basically I had a bunch of packages like Kafka, Spark-Streaming-Kafka, Kafka-Core et cetera and if you used one that was older or younger than sometimes you'd get NoClassDef found errors.

Do you have actual jobs or just larping. Just tell me where you work please.

He doesn't fucking have a job. People who shitpost about langs tend to be unemployed.

import java.util.ArrayList;
import java.util.stream.Collectors;

class Product {

}

class Order {
private ArrayList products = new ArrayList();

public Order() {
products.add(new Product());
products.add(new Product());
}

public ArrayList getProducts() {
return products;
}
}

class Main {
public static void main(String[] args) {
ArrayList orders = new ArrayList();
orders.add(new Order());
orders.add(new Order());

System.out.println(
orders.stream()
.map(o -> o.getProducts())
.collect(Collectors.toList())
);
}
}

>t. “I’m such a shit developer I have to write deliberatedly obfuscated and obtuse code no one other than me can maintain in order to ensure my own job safety”

Now try and explain your code to somebody that doesn't know jack about programming. 9/10 times they agree with the Java option.

Because it works.
>inb4 oop creates unmaintainable code!
Any code written by idiots is unmaintainable, but huge system of well writen functional code will always be less maintainable than same functionality oop code.

products.map(product => console.log(product))

>using map instead of forEach
map mutates products.

why do wannabes shill scala
just use haskell lmao

>modulo in the loop body
>3 times no less
The absolute fucking state of scalatards

Scala = employment
Haskell = Gentoo compiling, cheeto-encrusted burnout

Now write me an android app, OH SHIT YOU CANT

t. NEET
I bet you've never met an employed scala dev either

>that pattern matching

MOIST

It looks so useful for webshit form validation

Notice that JAVA convey the meaning of the code in a very explicit manner. It's also easier to tweak the JAVA codes.

Verbosity ain't bad, boilerplate is.

half of the Java code *is* boilerplate

lol retard the java code is instantly comprehensible, that's more valuable than the 5 lines you're conserving with your meme autist language

Because only socially adjusted people who can talk to others program in them, and at the end of the day that's who they want to hire.

>what are macros
I can very easily do that, using the flat binary output of the assembler and macros. In fact, that's how I generate Linux binary and shared object files, Windows executables, MS-DOS executables, and pretty soon Mac OS image files.

>Scala is hard to read
Nothing about Scala makes it any harder to read than any other functional language. If you're referring to this example, pattern matching is a basic feature in most meta langauges. Any language you're unfamiliar with is going to be hard to read, bu that doesn't mean it's objectively more difficult.

>tfw pajeets with no skills and even less talent are "more valuable" than white nerds who instantly get everything but sperg out and reveal power levels

Attached: 1541190541412.jpg (700x700, 22K)

Obscurity is the best job security, that's why everything should be written in Lisp

>imagine not being able to have a Timer class and just tie the jobs you want done at certain intervals subscribe to its event.
>imagine believing that oop is never good in any situation just because its not good for systems programming
>imagine shitting on oop just because the only oop language you know is java

Attached: 1546972412962.png (671x774, 18K)

Bait but sure


import java.util.stream.IntStream;

public class Bait {
public static void main(String[] args) {
IntStream.rangeClosed(0,100).forEach(number -> {
if(number % 15 == 0) System.out.println("fizzbuzz");
else if(number % 5 == 0) System.out.println("buzz");
else if(number % 3 == 0) System.out.println("fizz");
else System.out.println(number);
});
}
}

>events are magic oop features
What.

Breaking news: software reflects how people communicate. Building software is above all building a social community to make the product viable and to perpetuate it.

for-loops are an antipattern.

Yeah my God wtf is that spacing

Statistically, projects in functional langs tend to have fewer defects, so I guess companies just like to do pointless work:
web.cs.ucdavis.edu/~filkov/papers/lang_github.pdf

They just use what works.

there is nothing wrong with your brother being gay

>most used functional language
>dead
my nigga

Nope, you can't write an Android app with x86, you'll need to learn a whole different assembly language: ARM

that guy that doesnt know how to code proper Java kek kys

Jjj