Scala is not perfect but it’s very good. It’s competitive pressure arguably improved Java (streams, pattern matching, data classes).
> Scala is not perfect but it’s very good. I like to refer to it as Haskell with an extra chromosome: slow, hard to comprehend, and incredibly strong. I'm lucky enough to write it in my day job and I feel like I'm living life on easy mode because of it. It'd take a lot of money to lure me back to garbage like Python/JS at this point.
Scala 3.0
171–180 of 292 posts
Re: Scala 3.0
#172Earlier quoted context omitted.
What are you talking about? Java release notes look like a list of Kotlin features these days. Sealed classes, data classes, multiline strings, coroutines -> project loom, switch statement improvements to resemble Kotlin when statement, improvements to Streams to match Sequences.
These aren’t ‘Kotlin features’ they’re just normal language features. I really struggle to see Kotlin as being part of the debate here. These features are being driven by enterprise Java user pain points. And those people aren’t looking at Kotlin.
Re: Scala 3.0
#173Earlier quoted context omitted.
Does Scala 3 not advance the capabilities of Scala Native, making GaalVM unnecessary (if still an option) for running Scala without the JVM?
Scala Native and GraalVM Native Image are projects with different goals, so I wouldn't say that one makes the other unnecessary. Both projects aim to compile to native code, and have use-cases for projects where the JVM startup time is too high. However, one of the main goals of Native Image is to offer as much partial evaluation (PE) at compile-time as possible. Scala Native does also seem to do some PE, but my unde…
This is tangential, but I wonder if Native Image's focus on compile-time PE, and the overall design of GraalVM, would make it feasible to AOT-compile a sufficiently static subset of JavaScript to efficient native code. If so, that could influence my choice of language for new projects.
Re: Scala 3.0
#174I'm in need of a functional language for a small part of my system and I'm considering Scala and Purescript[0] (mostly because of their ecosystems). Maybe Scala 3 is a good time to be boarding Scala's ship. I'd appreciate if anyone has any advices of one vs the other. [0] https://www.purescript.org/
I wouldn't call Scala3 quite "start-a-project-with-it" ready because the ecosystem will need a couple of months at least to update, but Scala 2.13 should suit your needs more than fine.
Re: Scala 3.0
#175Earlier quoted context omitted.
They should have never been a language feature before IDEs were capable of working with them and exposing them. Luckily they do now...but Scala 3 makes it so that understanding them with a simple text editor is much easier. The fact that they have to be imported in a way that acknowledges their usage is a simple but important way to ease that burden, and the distinction between `given` and `using` is extremely helpfu…
Rumor has it Kotlin was inspired by frustrations getting Scala edge cases to work in IntelliJ.
But with Kotlin, it is actually enforced that the more advanced features of Scala are not available, so it makes sure that compiletimes etc. stay short. It also simply reduces the burden of the IntelliJ devs, because it's not just "Language -> IDE" but IDE capabilities impact how the language is designed too. And having a good IDE is very important for productivity.
Re: Scala 3.0
#176This is super cool! Looking forward to metaprogramming in Scala 3!
Choose your flavor @ https://docs.scala-lang.org/scala3/guides/macros/
Re: Scala 3.0
#177Earlier quoted context omitted.
What's an example of something they made more approachable? One of my first impressions of Scala, which I have barely seen, and do not know, is that there is a lot of syntax. Has anything been done to help with that? I don't think syntax matters much, but it's one of the only impressions I have of the language and wanted to ask about it.
That's an interesting take, as someone that's used Scala for a while I feel like there actually isn't that much syntax. I guess my perception is warped :-)
Re: Scala 3.0
#178I think the best evolution of a programming language is when some features are removed and replaced by a unifying concept which makes the language both smaller and and more expressive. Has that happened in Scala 3?
The biggest change touching your comment is replacing one feature (implicits) with a couple more tailored features (extension methods, conversions and context parameters). In practice they were very powerful and versatile, but also complicated, finicky and bug-prone. Feels a bit like pointers in that regard.
Re: Scala 3.0
#179Earlier quoted context omitted.
Are you considering them together, or against one another? I'd have considered Purescript, which compiles to javascript, to compete with Scala.js, but I hadn't realized (but now do) that purescript has a serverside component as well.
JavaScript has Node and Deno? Not sure the point you're making about serverside.
Re: Scala 3.0
#180Scala is not perfect but it’s very good. It’s competitive pressure arguably improved Java (streams, pattern matching, data classes).