Live data from Hacker News

Scala 3.0

github.com

271–280 of 292 posts

Re: Scala 3.0

#271

Always wanted to look into Scala but it seemed very intimidating. Is there a good intermediate 'How to' for Scala 3 anyone can recommend?

I'm recommending looking into ZIO too. It has the most useful effect system ("monad") currently in the Scala ecosystem.

Re: Scala 3.0

#272
post #268
post #197

Earlier quoted context omitted.

I've been extremely happy with IntelliJ plugin for Scala. I do use Visual Studio Code for Python,JS,web, etc. What would be advantage of using VS Code over IntelliJ for Scala?

I'm familiar with VS code and have a set up that I'm familiar with (shortcuts & settings) and I've only briefly looked at IntelliJ, so I'm not qualified to answer this question. What is the reason you're using IntelliJ rather than VS code?

some shortcuts are just stupid. sorry, but coming from a mac some things are a little bit wierd.

Re: Scala 3.0

#273
post #234

Earlier 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…

Do you think IDEs would have grown support for them before they were a language feature?

There are plenty of IDE features that get released at the same time as a language feature, or shortly thereafter. Implicits were not like that.

Re: Scala 3.0

#274
post #119

So, they removed implicits and introduced a number of other tools to replace common usecases for implicits. Can we take a step back now, and reflect on what was the original problem implicits were designed to solve and how it is solved now in Scala 3? I've heard the original problem was that they wanted a chain of functional transformations to return the same type of collection (unlike, say, Clojure or Java 9 which r…

CanBuildFrom got killed in 2.13, but taking a step back is exactly the right thing to do:

The desire to return the same type of collection lead to overall slow performance; it turned out it's a design dead-end that Scala is still suffering from.

It should simply have been abolished and replaced, instead of applying some minimal fixes in 2.13 that preserved the wrong design choices.

Re: Scala 3.0

#275

Does Scala have a chance to regain popularity? It was my main language for 5 years, and there was always a variety of Scala jobs in Berlin: companies of different industries, sizes. Recently, I mainly used Python at work. I love Scala and wonder if it makes sense to invest in keeping up my Scala 3 skills.

There are lots of Scala jobs in finance and its weird sibling cryptocurrencies. These pay very well, although I myself wouldn't touch those (anymore).

There are also lots of agencies using Scala, some machine learning and security stuff. Munich is a good place, Berlin, Zurich and Lausanne, if you want to stay in Europe.

I love the language and I'm very happy to get paid to do stuff in it. I don't think I ever learned that much using just one language, Scala is definitively a class of its own.

Re: Scala 3.0

#276
post #111

I'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/

May I suggest OCaml? It's a pragmatic functional programming language that's often used for finance applications, e.g. derivatives analysis at Bloomberg: https://youtu.be/r6mYb2w_6po . OCaml's strong static type system makes it very easy to write correct code, and its fast compile speed and near-perfect type inference make it very fast to iterate on code.

It can also target JavaScript if you need to deploy something on browsers.

Re: Scala 3.0

#277
post #196

Earlier quoted context omitted.

With version 3 it has another: Haskell doesn't yet have dependent types.

Hrm. Scala has had dependent types for quite some time.

Actually it appears to depend on your definition of dependent types. Scala apparently can't allow a type to depend on an IO-ingested value:

https://www.reddit.com/r/haskell/comments/ncaud3/scala_has_d...

Re: Scala 3.0

#278

Does Scala have a chance to regain popularity? It was my main language for 5 years, and there was always a variety of Scala jobs in Berlin: companies of different industries, sizes. Recently, I mainly used Python at work. I love Scala and wonder if it makes sense to invest in keeping up my Scala 3 skills.

It's hard to say there isn't a downwards trend at this point:

https://trends.google.com/trends/explore?cat=31&date=today%2...

Kotlin and Groovy both look pretty stable - both having core uses in their domains that I am guessing support continued traction as "the best tool for what they do". Scala I think peaked when it had the overlap b/w business use and data science.

I feel like Kotlin / Scala / Java are all after the same essential core market - a solid, type safe language to shoulder the huge broad need of enterprises to keep business software pumping away reliably. So they are essentially all part of the ebb and flow of the one giant "JVM" ecosystem.

Groovy sits a little outside of that since it specifically targets a different type of problem (providing an optimally integrated JVM scripting language for DSLs and rapid application development).

Re: Scala 3.0

#279
Fascinating to see not just the breadth and depth of new features but also what has been targeted. Stuff like Python-style significant whitespace[0] was definitely not on my radar.

On the one hand, Scala is such a seductive language - there is literally nobody it doesn't cater to. Whether you're into FP, OO, data science, enterprise business logic, strict conservative style explicit semantics vs going wild with implicits and DSLs etc, and now whether you like significant whitespace or not ...

But on the other hand its the same story as always - all this crazy optionality of features mean its got such a huge surface area for people to understand. Its a language where I get what I feel is functionally competent and then dive into a codebase in github and I can barely even recognise the syntax, let alone feel confident to make a change.

[0] https://dotty.epfl.ch/docs/reference/other-new-features/inde...

Re: Scala 3.0

#280
post #198

Earlier 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.

Scala is one of the smallest typed languages in terms of syntax. See slide 13: https://www.slideshare.net/Odersky/preparing-for-scala-3#13 With scala 3, syntax has been simplified even more, e.g.: No more braces necessary. Top level declarations. Extension Methods.

I think "lots of syntax" means many rules to learn, rather than many characters to type. So this change means even more syntax.
Post reply on HN