Earlier quoted context omitted.
I won’t even mention the anecdata from my own workplace. I’ll only say that within my extended network people are frantically rewriting Scala bits in other languages. Those who are stuck with it (because of, say, extensive prior investment into Spark) are scrambling to come up with alternate solutions. Put your ear to the ground, and you too will hear it.
There is an ongoing work on creating Spark alternative in Rust[1][2]. Hopefully, that could help. [1] https://github.com/rajasekarv/native_spark [2] https://medium.com/@rajasekar3eg/fastspark-a-new-fast-native...
The Road to Scala 3
171–180 of 196 posts
Re: The Road to Scala 3
#172Earlier quoted context omitted.
I'll speak for myself. I just jumped ship from a Scala team and took a pay hit to get out because it was so horrible. No one on the team had a strong command of the language, which made it worse. The application was a ball of mud. The week I left, proposals to rewrite everything in Java were heard. I took a position on a Go team and am much happier.
I wouldn't jump ship to a Go project, but I am currently in the situation you fled from. Even the core team who started the project doesn't have command of the language. I have some experience with rust and Haskell (hobby) and JVM experience with Java and clojure so I can get by but it is not pleasant. I think the situation is similar to c++ where too many features have been added over time. While with c++ there is a…
On the flip side, Scala can be a very pleasant stack to work with if you have right people on the team.
> While with c++ there is a body of compiled recommendations on what not to use and how to write c++, for scala that doesn't really exist.
Principle of least power is what you need.
Re: The Road to Scala 3
#173Earlier quoted context omitted.
>With all that said, the church of FP and the hascalator community is a problem for Scala. Overly dogmatic & academic functional programming styles don't have a place in production systems. Isn't Scala minus the problems you mentioned just Kotlin?
Does Kotlin have the maybe monad?
Personally, being able to solve problems with the abstractions you can achieve within the language over adding very specific language features to solve them appeals to me more.
Having said that, Arrow has Option: https://arrow-kt.io/docs/apidocs/arrow-core-data/arrow.core/...
Re: The Road to Scala 3
#174The problem of Scala is that it is outclassed by Rust and Kotlin at its two niches of, respectively, "best designed programming language" and "better Java on the JVM". Scala can't beat Rust because you can't have safe concurrency (and also single-threaded mutation control) without linear types, and you can't have linear types on the JVM; furthermore, a GC and VM-based language is inferior to a native non-GC one provi…
On the flip side, Scala will never be as good system language as Rust is, even after adding more improvements to the JVM e.g. value types, or even with Scala native. In these use cases where I need a tight control of resources I'd take Rust over Scala every time.
As for Kotlin - meh, it is just Java with nicer syntax, not interesting to me at all.
Re: The Road to Scala 3
#175Earlier quoted context omitted.
> Java 14 records, pattern matching and switch expressions are like a joke compared to Scala case class and pattern matching. What does Scala's pattern matching do that Java's (upcoming) doesn't? > For example, does Java 14 Stream have any method equivalent to `collect` in Scala, which is a combination of filter and map? Not that I'm aware, but then again, I don't see the large advantage compared to making two separa…
An example of Scala's pattern matching: case class Person(name: String, age: Int) // a collection of 3 people val c1 = Vector(Person("A", 5), Person("B", 6), Person("C", 4)) // now I want a collection of people who have age > 4 and then their ages are doubled val c2 = c1 collect { case Person(name, age) if age > 4 => Person(name, age*2) } How do you write it in Java 14? Want something lazy like Java streams? It's Laz…
data class Person (val name: String, val age: Int)
val c1 = listOf(Person("A", 5), Person("B", 6), Person("C", 4))
val c2 = c1.filter{ it.age > 4 }.map{ it.copy(age = it.age*2) }Re: The Road to Scala 3
#176Earlier quoted context omitted.
I won’t even mention the anecdata from my own workplace. I’ll only say that within my extended network people are frantically rewriting Scala bits in other languages. Those who are stuck with it (because of, say, extensive prior investment into Spark) are scrambling to come up with alternate solutions. Put your ear to the ground, and you too will hear it.
There is an ongoing work on creating Spark alternative in Rust[1][2]. Hopefully, that could help. [1] https://github.com/rajasekarv/native_spark [2] https://medium.com/@rajasekar3eg/fastspark-a-new-fast-native...
Re: The Road to Scala 3
#177Earlier quoted context omitted.
FWIW, I'm in a FAANG and finding Scala devs is even a problem within my own org and team. We've resorted to teaching largely Java devs Scala on the job with mixed results. A former senior manager who made the decision supposedly viewed going all in on Scala as a mistake in large part due to the huge time loss in ramping people up & problems hiring. I like what I've used of the language at work, although I tend to wri…
Hiring Java devs is the problem. It's a lowest common denominator language. Try looking for Ruby or JS devs. It's a lot easier to teach someone from a dynamic background how to leverage a type system than it is to teach an imperative developer to write side effect free code. State is a crutch.
If there is one thing this profession has taught me about hiring, it is that it is very difficult to predict who the top performers will be. Blanket assumptions will often prove to be not true when searching for the cream of the crop.
Re: The Road to Scala 3
#178Earlier quoted context omitted.
Does Kotlin have the maybe monad?
Not in the standard library. Kotlin went with specific language features to achieve null safety: https://kotlinlang.org/docs/reference/null-safety.html Personally, being able to solve problems with the abstractions you can achieve within the language over adding very specific language features to solve them appeals to me more. Having said that, Arrow has Option: https://arrow-kt.io/docs/apidocs/arrow-core-data/arrow.…
Honestly I prefer maybe monads to null coalescing
Re: The Road to Scala 3
#179Earlier quoted context omitted.
Kotlin is not the future of anything. They got the Android boost and still, two years later, all they have to offer is a molasses-slow improvement pace and a shitty dev experience in their signature IDE (which also happens to be made by the same company). Last time I tried to create a Kotlin project in IDEA, it couldn't provide type information on hover. The Kotlin dialect of Gradle was barely supported enough to be…
We're writing new apps in Kotlin instead of Java, works fine for us. shrug Vert.x , Ktor apps, Kafka streaming apps. IDEA handles it absolutely fine these days, I suspect you last tried it sometime ago. Can't comment on the Gradle stuff though, I vastly prefer Maven.
Re: The Road to Scala 3
#180Earlier quoted context omitted.
An example of Scala's pattern matching: case class Person(name: String, age: Int) // a collection of 3 people val c1 = Vector(Person("A", 5), Person("B", 6), Person("C", 4)) // now I want a collection of people who have age > 4 and then their ages are doubled val c2 = c1 collect { case Person(name, age) if age > 4 => Person(name, age*2) } How do you write it in Java 14? Want something lazy like Java streams? It's Laz…
In Kotlin data class Person (val name: String, val age: Int) val c1 = listOf(Person("A", 5), Person("B", 6), Person("C", 4)) val c2 = c1.filter{ it.age > 4 }.map{ it.copy(age = it.age*2) }