Untitled

_

Attached: scala-spiral.png (304x492, 78.13K)

Other urls found in this thread:

users.scala-lang.org/t/arguments-against-scala-language/7062
mungingdata.com/scala/maintenance-nightmare-upgrade/
github.com/Randgalt/record-builder
twitter.com/NSFWRedditImage

Made obsolete by Rust.

Made obsolete by Java which, funny enough, it is also the language it was trying to defeat.

;

Deprecated via Kotlin+Clojure

users.scala-lang.org/t/arguments-against-scala-language/7062
mungingdata.com/scala/maintenance-nightmare-upgrade/

Joke of a language

>Made obsolete by Java which
Oh yea you just have to spam Stream.of().collect() everywhere.
>Deprecated via Kotlin+Clojure
Lmao what? Kotlin doesn't even support higher kinded types. No macro programming. No implicits. Don't compare a better Java to Scala.

>Oh yea you just have to spam Stream.of().collect() everywhere.
Yes, and? Ugliness is not enough of a reason to ditch the most used programming languages. The same holds for C++ vs Rust and co.

Boilerplate is. There are too many simple things missing in Java, like tuples etc.. I am still writing a lot of Java to this day but saying modern Java has made Scala obsolete is nothing but trolling. Scala is way too powerful.

>There are too many simple things missing in Java, like tuples etc..
Just give it a name
record Point(int x, int y) { }
var p = new Point(100, 400);


There are missing things, but you are not gonna miss that much really.
Sometimes good enough is good enough and it takes A LOT to kill a popular language. Rust will never kill C++ like Scala will never kill Java.

now create a copy of that record with another value.

also no val. You'll have to spam final var everywhere. Bro, don't try to argue with me. Also I don't need fucking dependency injection frameworks with Scala because implicits exist.

based

>now create a copy of that record with another value.
A new pair? Perhaps I'm not understanding what you mean, because I don't see the problem.

You are keep arguing about constructs without mentioning (perhaps by posting code) their application and how they make it clean. It's like talking about haskell complaining because you can't mutate values and make objects: different programming languages solve problems in different ways.

>A new pair? Perhaps I'm not understanding what you mean, because I don't see the problem.
Let's say you wanted to create a new case object with a different value of x.
In scala you just
point.copy(x =5)

In Java you'll need to create withers for each record.

*Also let's not even talk about Java's generics..

Records are immutable by design. If you want to create a copy with a changed value use class
class Point {
public int x, y;
public Point(int x, int y) { this.x = x; this.y = y; }
}

var i = new Point(100, 200);
var j = i;
i.x = 150;

and if you want to keep immutability use 'withers', as you said
record Point(int x, int y) {
public Point withX(int x) { return new Point(x, y); }
public Point withY(int y) { return new Point(x, y); }
}

var i = new Point(100, 200);
var j = i.withX(150);

It is verbose because java is well known to be a verbose language, but the result is exactly the same.

I agree that Java is not the greatest language, there are many things I don't like about it, but you must be smoking if you think it's gonna die because Scala (or Kotlin) will kill it. Programming languages evolve and popular programming language are very resilient. Not even C is dead, despite is almost entirely superseded by C++. Also, lots of people think Java is worse than what it really is and give "new languages" too much credit.

>Records are immutable by design.
No fucking shit, hence "copy"
>It is verbose because java is well known to be a verbose language, but the result is exactly the same.
It's garbage
>but you must be smoking if you think it's gonna die because Scala (or Kotlin) will kill it.
Now nigger, please quote me. When did I ever say that? You said that modern Java has made Scala obsolete. I never said anything about Scala killing Java. Scala has its own niche and Java will never be able to replace it in its niche.

>No fucking shit, hence "copy"
You can copy a record. If you want to copy it with a "modified" value you either go with withers or make it mutable. It is a niche use case anyway and it doesn't take much to write withers if you really need it.

>It's garbage
"it's bad because it's bad, okay?!"

>Now nigger, please quote me.
Okay, I'm fine with that. If you think scala will not kill/replace java I'm with you. That's really all I wanted to say. I don't use java that much and I know various languages including fancy shit like common lisp. Just face the fact that scala has a niche while java has "the big piece of the cake" (ie., it is used fucking everywhere). My posts are due to the fact that I'm sick of hearing people shilling le brand new language while failing to recognize how "the old stuff" is actually catching up quickly enough and very often the gap is not worth the switch.

>It is a niche use case anyway
No it is not or else people wouldn't be building shit like this github.com/Randgalt/record-builder
>Okay, I'm fine with that. If you think scala will not kill/replace java I'm with you.
Nothing will. No Scala, no Kotlin, no C# or whatever even though there are tons of people who like to delude themselves into thinking that.

_

Who here zio 2.0