Live data from Hacker News

The Road to Scala 3

scala-lang.org

101–110 of 196 posts

Re: The Road to Scala 3

#101
post #75
post #58

The more I read about Scala it makes me wonder why (1) I am not using it (or my team) (2) Java teams across the world are not at least seriously considering changing to Scala. It seems likes it's miles ahead of both Java and even Kotlin.

> Java teams across the world are not at least seriously considering changing to Scala. I've used Scala before. It has challenges that would make it a non-starter for many teams. It has some cool features, but those (IMO) don't outweigh the negatives that come with the language: it's overly complex (different people have very different styles for writing the language), the compiler is slow, it generates more garbage…

If I read it correctly, you said "Scala standard library is not up to par", "Java is improving significantly in the coming few releases: pattern matching, records, switch expressions". I see the other way around: Java 14 records, pattern matching and switch expressions are like a joke compared to Scala case class and pattern matching. For example, does Java 14 Stream have any method equivalent to `collect` in Scala, which is a combination of filter and map?

Re: The Road to Scala 3

#102

Earlier quoted context omitted.

Interested but how much as good as with kotlin? Being compatible is one thing, being as idiomatic is another.

Nowhere near as good or as seamless as Kotlin interop, Kotlin made interop a priority/first class feature. When using a Java library in Clojure, many times its just better to just write some Java for your Clojure program specifically for the purpose of calling it from Clojure.

In what sort of situations have you needed to write more Java to use a Java library from Clojure? I've never felt the need to do this. It's sometimes helpful to write a Clojure wrapper for a Java library on order to use it in a more Clojure-y way.

Re: The Road to Scala 3

#103
post #88

I love Scala, it has a nicely advance static type system, supports functional programming and has even macros, although they are a bit messy. Something I miss in go and python. Go's type system is way to simple and python is dynamic, which I think is unnecessary these days. Static type systems can be as expressive as dynamic ones. It has interesting libraries, like cats, shapeless, breeze. And it is popular in the bi…

Yeah, the thing with macros is that they were never officially supported. They were always kind of a hack. Scala 3 finally has an answer for that[1]. Besides that; yeah, Scala is amazing. I really see it shine for scientific computing when it moves beyond Python. [1] https://dotty.epfl.ch/docs/reference/metaprogramming/macros....

It looks much cleaner and pleasant to use. Perhaps time to play around a little bit with dotty.

Re: The Road to Scala 3

#104
To all those saying Scala is dying:

Personally I am making top money on Scala gigs, and I don't see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn't take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn't take over Scala, with the exception of serverless)

Teams in Media, Government and Finance are leveraging Scala to do things that take Google and Netflix twice as many devs because they use less expressive languages.

Yes, Go is great because you can scale a team from 1 to 10 to 100 with little effort. With Scala you get the same stuff done with 20 people.

The people that hate Scala are either Java devs that didn't get it because they wanted to write inheritance based OOP code and would still be bad devs in any other lang, or are hiring managers that struggled to get the right people.

This is actually an advantage when you have the right hiring process as you end up with better developers - they don't need to know Scala, but need to be open minded to new ideas and motivated to learn.

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.

Leverage the type system, immutability and the Future/Option monads and you eliminate huge swathes of bugs. If you are looking to write "Java on steroids" or would rather be writing Haskell then you are probably contributing to Scala's perceived problems.

If you are a startup or small business then Scala isn't a good fit - you're probably better off starting with JS or Python and moving to Scala when you have more users and need to deliver something solid. FAANG don't need to use Scala because they can throw money & devs at problems and therefore favour languages that fit that modus operandi.

For all the companies in between, Scala is great fit because when you get the right people you can outmanoeuvre any competition.

One of the earlier comments described Scala as a love child between Java and Ruby that turned out great. Despite not having used Ruby in anger I agree with the sentiment as I believe the best way to write Scala is as a statically typed Ruby for the jvm. It's supposed to be simple and elegant, and the best Scala devs realise this. To re-iterate my earlier statement, if you are trying to write something "oop" or "pure fp" then you are getting it wrong.

Re: The Road to Scala 3

#105
post #104

To all those saying Scala is dying: Personally I am making top money on Scala gigs, and I don't see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn't take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn't take over Scala, with the exception of serverless) Teams in Media, Government and Finance…

>If you are a startup then Scala isn't a good fit. FAANG don't need to use Scala because....

Not a FANG, but close, Twitter is a huge Scala shop and was one of the first to run Scala workloads on GraalVM in production.

Twitter’s Quest for a Wholly Graal Runtime by Chris Thalinger: https://www.youtube.com/watch?v=PtgKmzgIh4c

Re: The Road to Scala 3

#106
post #105
post #104

To all those saying Scala is dying: Personally I am making top money on Scala gigs, and I don't see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn't take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn't take over Scala, with the exception of serverless) Teams in Media, Government and Finance…

>If you are a startup then Scala isn't a good fit. FAANG don't need to use Scala because.... Not a FANG, but close, Twitter is a huge Scala shop and was one of the first to run Scala workloads on GraalVM in production. Twitter’s Quest for a Wholly Graal Runtime by Chris Thalinger: https://www.youtube.com/watch?v=PtgKmzgIh4c

Yeah Scala on Graal will be fantastic - as I say in my post Scala isn't a great fit for serverless, but Graal is likely solve that.

I adore Finagle/Finatra and wish it had the mindshare over play.

Re: The Road to Scala 3

#107
post #104

To all those saying Scala is dying: Personally I am making top money on Scala gigs, and I don't see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn't take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn't take over Scala, with the exception of serverless) Teams in Media, Government and Finance…

We're a Ruby/Python/JS/Scala shop and once people are up to speed the productivity of Scala blows the other three out of the water. It's insanely hard to beat the productivity-performance ratio of Scala.

Re: The Road to Scala 3

#108
post #32

I love scala, and am very much looking forward to scala 3. For all the complaints about the language that always pop up in these threads: yes, the language lets you shoot yourself in the foot (with great power comes people who don’t apply it responsibly), but it’s precisely that power that makes it so useful and exceptional when judiciously applied. I like to say that scala is as if java and ruby had a love child and…

> I like to say that scala is as if java and ruby had a love child and it all worked out. I feel Kotlin is probably a more accurate result of this mindset, but reasonable people disagree. What part of ruby or java has anything morally or technically even approaching the concept, use case, or meaning of implicits?

Kotlin is more like if Java and Python had a love child. It's clean, simple, quick to pick up, and pretty much retains the behavior of the underlying language.

Re: The Road to Scala 3

#109
post #104

To all those saying Scala is dying: Personally I am making top money on Scala gigs, and I don't see that changing anytime soon. The people I meet on these gigs share my opinion. Most people wouldn't take a Java job even if it paid more, same for Go or Node ( both of which I have used in production in the last month, and wouldn't take over Scala, with the exception of serverless) Teams in Media, Government and Finance…

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 write a lot of JavaScript on a day to day basis, but to say the right hiring process makes Scala an advantage is not quite right in my own experience.

Re: The Road to Scala 3

#110

Earlier quoted context omitted.

> I like to say that scala is as if java and ruby had a love child and it all worked out. I feel Kotlin is probably a more accurate result of this mindset, but reasonable people disagree. What part of ruby or java has anything morally or technically even approaching the concept, use case, or meaning of implicits?

Kotlin is more like if Java and Python had a love child. It's clean, simple, quick to pick up, and pretty much retains the behavior of the underlying language.

I agree I came from Python/F#. I've also had a lot of success converting python teams to kotlin, and ruby teams to scala.
Post reply on HN