Live data from Hacker News

Scala 2.13 is now available

scala-lang.org

41–50 of 87 posts

Re: Scala 2.13 is now available

#41
post #24

I work at a major online fashion aggregator and my team uses Scala extensively for our search API (with Twitter's Finatra) and also in several of our data pipeline systems (Akka, Spark). When I joined a few years ago, I was honestly not most excited about working with Scala, but the more I got into it, the more I realised that Scala got a lot of things just right. In particular, I really miss working with the collect…

I used Scala five-ish years ago, and I loved it, but I had two qualms: 1. The community was terribly split between FP purists who wanted to write Haskell on the JVM and pragmatists who leaned more towards the "better Java" side of things. Plus the occasional ex-Rubyists who came up with method names consisting solely of interpunction ("embedded DSL!"). Has any side won? It would be nice to have anything resembling "i…

I think there's a sensible middle ground.

Using types for side effects (eg Slick does it for DB IO) and error handling (see also Rust's Result type) is great.

Scala's for-comprehension (which is Haskell's "do" notation) is a bit awkward (you have to understand that it's a syntactic sugar, and you have to learn about monad transformers, because you have to align the types, so if you started with an Option you have to return an Option, so you have to wrap your Futures and Lists, but it's pretty automatic).

There are a few things that seems harder if you are used to less pure languages, let's say you can't just manage a request context "somewhere" and rely on the dark arts of whatever Java (or Python's Flask) frameworks do. You have to pass around a context. Use implicits. For async Scala already wants you to pass around the execution context. And that's a good thing. Less black magic is always nice in the long term.

Going full FP can be ... painful. When all you see is functions, functions getting passed function, that return functions, that can be called with other functions that ...

Yes, sure, in the end the data is passed/transformed/filtered/mapped/reduced the same, but usually reading FP code is a lot less straightforward than it should be. (For example nice chained functions / data-pipelines are great, easy to read, etc. But going overboard with currying and function passing is not.)

Re: Scala 2.13 is now available

#42
post #24

I work at a major online fashion aggregator and my team uses Scala extensively for our search API (with Twitter's Finatra) and also in several of our data pipeline systems (Akka, Spark). When I joined a few years ago, I was honestly not most excited about working with Scala, but the more I got into it, the more I realised that Scala got a lot of things just right. In particular, I really miss working with the collect…

I used Scala five-ish years ago, and I loved it, but I had two qualms: 1. The community was terribly split between FP purists who wanted to write Haskell on the JVM and pragmatists who leaned more towards the "better Java" side of things. Plus the occasional ex-Rubyists who came up with method names consisting solely of interpunction ("embedded DSL!"). Has any side won? It would be nice to have anything resembling "i…

I don't think any side has won, but from what I gather Odersky thinks pragmatic functional is the way to go, i.e. only mutate when it brings substantial benefits to code clarity over a pure approach. That is, the default should always be functional, but use an imperative style where it makes sense.

Re: Scala 2.13 is now available

#43
post #29
post #18

I personally really like how this release turned out. Tons of polish, cleanup, simplification, and performance work. Basically tackling the core problems with the language, with minimal feature creep or additional complexity (I must admit to contributing to that creep in a small way)

I guess there's always "one more feature", but to me it feels like Scala stopped frustratingly just short of getting the language design right. Partial type application is frustratingly cumbersome. For the last 3 releases or so - which is what, 6 years of language development? - people have been using the kind-projector plugin to the point that it's now pretty much entrenched. Any kind of built in solution - even if…

Scala seems to be lacking sponsors and contributors. Since 2018-01-01 according to GitHub only 44 people committed to scala/scala. (Which naturally follows a power-law distribution, so half of those people only have one or a few commits.)

And it's similar for the lampepfl/dotty repo (since 2018-01-01: 52 people, And at the same time there are a lot of actively maintained libraries/frameworks/tools, but the overlap of the maintainers of those with the compiler maintainers is significant.

So all in all it's not surprising that things are not progressing super fast.

Re: Scala 2.13 is now available

#44
post #8
post #3

Why is Scala not more popular? It seems like such an awesome language, is it because of it academic origins or because it's not functional enough?

I've been turned off of it by SBT in the past.

I have never fully understood why people are often upset with SBT.

Sure it is not perfect, but the alternatives are much worse and most of the issues people have with SBT projects are other people abusing the build file.

The REPL, fast incremental builds, continuous unit testing, shared SBT sessions, etc makes my day so much better.

I live all day long with: `~testOnly *WalabySpec -- -z killRoo`.

Whenever I have to jump into an app using Maven or only slightly better Gradle it is so frustrating.

Re: Scala 2.13 is now available

#45
post #39

Earlier quoted context omitted.

A lot of Java shops moved from Maven to Gradle, and Gradle builds Scala projects: https://docs.gradle.org/current/userguide/scala_plugin.html Bazel works well too: https://github.com/bazelbuild/rules_scala

Maven itself works fine. In nine years of Scala I've never understood what problem SBT is supposed to solve - it seems very complicated to no real benefit.

I loved the incremental compile/watch tests stuff myself. It's been a while, but I do miss having all my tests run every time I save a file.

But I do accept that sbt is not everybody's cup of tea.

Re: Scala 2.13 is now available

#46

Earlier quoted context omitted.

You don't need SBT. Gradle builds Scala projects just fine.

Except Gradle is worst ...

Gradle is so much better than maven it's not even funny. Every time I check out a project in maven these days, I flinch.

Re: Scala 2.13 is now available

#47
post #7

Extremely excited with the release! I work at a fashion renting company and our backends are built on top of Scala stack. Contrary to popular belief, Scala is actually quite a simple language. Most of our engineers came from PHP or Python, or Ruby and all have expressed how type safety gave them great assurances that everything works if it compiles. On top of that the behaviour of the language is very predictable! We…

You mentioned PHP or Python, or Ruby devs. How was your experience on-boarding programmers with no Scala experience?

Re: Scala 2.13 is now available

#48
post #3

Why is Scala not more popular? It seems like such an awesome language, is it because of it academic origins or because it's not functional enough?

Scala is only 15 years old. It's quite popular if you consider its age.

Sometimes Scala teams are more expensive to set up. So there are budget-friendlier alternatives (Java, PHP, Python, NodeJS) for many projects.

Re: Scala 2.13 is now available

#49
post #28

Interesting that so many fashion companies use scala :)

fashion/media centers like NY have their own buzz even in technology. I remember back when Scala appeared, even Wall Street Journal running an article touting Scala as the next big happening in technology.
Post reply on HN