Live data from Hacker News

Scala 3.0.0-M1

github.com

131–140 of 148 posts

Re: Scala 3.0.0-M1

#131

Earlier quoted context omitted.

> Rust which simply has a wider applicability area Rust is a great language but that's a pretty insane statement. The ecosystem is still tiny compared to the JVM.

Out of context yes. I should have said that with respect to which language pick up next and which language has a bigger future potential. Rust is so omnivore and hits on so many critical aspects that it is hard to deny it. Given it had rich and mature ecosystem now how many would pick Scala? Those who prefer GC pauses and have a hard dependency on JVM? But even then you are pitted against Kotlin and Java itself. I wo…

I don't exactly see how Rust can replace Scala where Scala is mostly used today. Or even Swift, despite Apple being more serious on the server-side roadmap lately and hiring a bunch of people from the JVM world.

Kotlin doesn't bring anything new and is full of ad-hoc design decisions, and Java itself is catching up (and even potentially surpassing it, see pattern matching for instance). I don't think it's a huge threat. Sure you'll see people who didn't really understand the point of Scala move to Kotlin because they just wanted a better Java really, and Kotlin does that well. But I think it's been clear that Scala shouldn't try to pursue this goal, for the past 5 years at least, after the hype around Spark cooled off.

I'm happy that Scala 3 is focusing on the biggest pain points. I'm also quite happy with the resources that have been added behind the tooling and ecosystem lately. The Scala center wouldn't exist if there wasn't a real demand for improvements in the mid to long-term future.

Re: Scala 3.0.0-M1

#132
post #121
post #4

I've always loved Scala and Scala 3 is shaping up to be extremely exciting. Love the new ADTs and braceless syntax: really gives the language a cleaner and more ML inspired feel. No other conventional language (including OCaml, F#, etc) seem to have the effortless kind of power Scala does. The combination of the extremely powerful type system with the "OOFP" paradigm is a great combination. OOFP is such a great parad…

When Scala, IntelliJ and SBT cooperate the language is so pleasant to work with. There are some puzzling omissions though. For example slice method is missing step. Coming from heavy data munging Python this really bites. Sure would be nice to have some syntactic sugar for slice. Some seemingly simple tasks have no one way of solving them. Let's take parsing JSON. Trivial in Python, painful in Scala. (almost the reve…

Why wouldn't you just use Jackson for JSON? It makes parsing JSON trivial on the JVM.

Re: Scala 3.0.0-M1

#133
post #4

I've always loved Scala and Scala 3 is shaping up to be extremely exciting. Love the new ADTs and braceless syntax: really gives the language a cleaner and more ML inspired feel. No other conventional language (including OCaml, F#, etc) seem to have the effortless kind of power Scala does. The combination of the extremely powerful type system with the "OOFP" paradigm is a great combination. OOFP is such a great parad…

> Too bad there's not really a ML/AI ecosystem around (besides Spark, which seems to be losing favor partially because of its embarrassing performance) Compared to what? If you mean engines like Presto, I would say they have different use cases, plus Spark SQL puts them roughly in the same ballpark. Genuinely curious though, as a Spark user that is always interested in alternatives.

kdb+/q performance smokes Spark. Actually. most native code on a single machine smokes an entire Spark cluster.

Re: Scala 3.0.0-M1

#134
post #109

The most important thing that no one seems to mention is that Scala 3 is not compatible with Scala 2. This means that they are creating competition for themselves. It is the Python 2 vs 3 problem all over again.

I never quite got what made python 2 -> 3 so much more complicated than say php 5 to 7.

I heard nobody complain the time I was still active in the PHP world (lucky me right?). Yet the Python2 code just kept lingering everywhere.

Re: Scala 3.0.0-M1

#135
post #7

Earlier quoted context omitted.

For me scala's feature set is absurdly big and there are always 10 ways todo things. Look at the spec of Scala. Its 200 pages long. That's insane. I'd rather use Kotlin.

Having switched from Scala to Python recently, I must say Python has probably 5x more ways to do things than Scala and I can't see people complaining on Python's complexity. This is something that really surprised me, because "one obvious way " was announced to be a part of Zen of Python.

and 0 way to do a lot of things

Re: Scala 3.0.0-M1

#136
post #99

Earlier quoted context omitted.

I really enjoyed writing Scala code. I'd agree with your evaluation with respect to the expressiveness and power provided by the language. ...but the tooling, at least at that time, was terrible. SBT was terribly overcomplicated, and full of foot-guns. I spent far too much time debugging dependency collisions, issues created by so-called "autoplugins" and other nuances that had nothing to do with getting real work do…

SBT is a fractal of awfulness and I have no idea why anyone ever uses it. But it's never been required. Just use maven and get on with your life.

cbt and mill are just obvious scala code

Re: Scala 3.0.0-M1

#137
post #136
post #99

Earlier quoted context omitted.

SBT is a fractal of awfulness and I have no idea why anyone ever uses it. But it's never been required. Just use maven and get on with your life.

cbt and mill are just obvious scala code

How's their IDE integration? (Though TBH I'm coming from a starting point of "Maven isn't broken, there's no need to fix it")

Re: Scala 3.0.0-M1

#138
post #137
post #136

Earlier quoted context omitted.

cbt and mill are just obvious scala code

How's their IDE integration? (Though TBH I'm coming from a starting point of "Maven isn't broken, there's no need to fix it")

for mill intelij and vscode via the metals extension

Re: Scala 3.0.0-M1

#139
post #111

Earlier quoted context omitted.

I completely disagree. The best things in Kotlin has nothing to do with coroutines, it is the extension functions and the soon-to-be released typeclasses (multiple receivers). Java is lagging behind, while Kotlin gets pragmatic and useful features very frequently.

I have some friends/colleagues who use kotlin in personal projects and they enjoy it. But I've never heard them talk about those features. And they certainly aren't enjoying it now because of soon-to-be-released features. But I am interested to learn more. Do you know any good resources?

I think the soon-to-be-released features anxiety is applicable for any language, it is not unique to Kotlin. A good resource for this is the Kotlin Koans for example or the Kotlin STDlib itself. I also maintain some OSS projects that use these things extensively (pun intended). What's also present in the language is the multiplatform functionality. You can't do this in Java and you probably never will be able to do it. With this I think Kotlin is one of the two languages that's capable of isomorphic behavior all across the board (you can write everything in Kotlin).

Re: Scala 3.0.0-M1

#140
post #125

Earlier quoted context omitted.

Thank you! I will have to look into ujson deeper.

You can in fact mix typed and untyped parsing, by having a `ujson.Value` field in the middle of your typed case class or collection. It just works

Thank you Li!

`ujson.Value` is in chapter 8.1.1. of your excellent Hands-On Scala book I've bought.

Turns out for arbitrary JSON you can do this:

  val rawData = read[ujson.Value](JSONstring)
For JSON where you know most of the structure but have mixed types for object values: https://jsonplaceholder.typicode.com/todos

  val todoData = read[Seq[Map[String,ujson.Value]]](todoJSON)
Post reply on HN