We built full stack web applications: Scala on the JVM on the backend, and Scala.js on the frontend. For the frontend, used React.js (via Scala.js bindings) at one company, and my own Scala.js UI library Laminar at another. Mobile was implemented as a responsive web app. I've read that you can even use React Native from Scala.js, but we haven't needed that, so I haven't tried. The older React.js bindings were somewhat cumbersome, but the newer ones (slinky.dev) were great. The rest worked very well.
Working in a single language across frontend and backend is amazing, especially when the language is so nice. Sharing models, codecs, validations, etc. And again – all of that in a very friendly language. Scala's expressive yet safe type system is very good at describing the business domain, encoding constraints, etc.
The only weakness of Scala.js I would say is it takes a bit more effort to integrate with JS libs. The mechanism is the same as with Typescript – just need the type definitions, but in practice it needs a bit of manual work. It's not a big deal though because with Scala.js you don't really do the 200-npm-dependencies thing that so many JS projects are cursed with. Lots of stuff comes with the language or from nice Scala libraries, including immutable data structures, powerful collections, validations, state management, etc.
Scala has somewhat of a reputation for being complex, but the language itself is ecstatic in its simplicity and elegance. The problem historically lied in certain functional programming libraries that require a certain formal / academic mindset to work with. They did become more ergonomic and better documented with time, but those are still very advanced concepts for most devs. I did work with such a codebase, and I have to admit it was not the easiest. But that was before AI – nowadays it's a lot easier for me to figure out these things. But I don't need to, at my current job we don't use them. So I would advise to learn Scala the language before going off the deep end into hardcore FP libraries. That's a completely optional destination that you don't need to force onto yourself if that kind of style doesn't jive with you.
Speaking of AI, I've been asking both ChatGPT and more recently Claude about Scala 3 and about functional programming libraries, and they're pretty good. I don't "vibe code" so don't know about that, just asking for code snippets or for explanations.
I think a lot of criticism of Scala comes from the functional paradigm. More specifically it’s trying to be a mainstream language when the concepts it represents are not quite mainstream concepts for most software. The language designers, in an attempt to make it more mainstream, allow devs to use Scala in the more mainstream way (object oriented). This flexibility, ultimately, perhaps strangely, appears to hurt its adoption because of the learning curve of dealing with a language that mixes the two concepts.
Also for me, subjectively, it honestly feels too abstract at times. You can almost feel the academic joy of the beautiful, unintelligible concepts where you can express things so succinctly, but requires a small mountain of concepts to understand how to write that nice code. It’s quite frustrating to do battle with the compiler when you don’t fully understand the type system and that initial hurdle is kind of tough to get over if you’re also trying to switch into a functional paradigm from an objected oriented one.
The problem with overly abstract concepts is a problem of specific Scala functional programming libraries, and not of the Scala language itself, or of other, simpler Scala libraries (e.g. com-lihaoyi stuff, Play, my own Laminar on the frontend, etc.)
If you need to know category theory concepts like Monad / Semigroup / etc. in order to understand your code, you're not doing regular Scala, you're doing Haskell-style FP in Scala. Which is a popular choice that many people swear by, but is entirely optional. Personally I don't think the complexity of that approach is worth it, and we don't use any of that stuff at work, and still reap the benefits of Scala.
Scala is a true multi-paradigm language, it does not have a monoculture. Lots of people who use Scala don't use highly abstract FP libraries. I very much don't think that the OOP side of Scala is the language designers' concession for the sake of broad appeal. Seamless fusion of FP and OOP is the essence of Scala, and it works great for that without any third party libraries. The designers' attitude is evidenced by the libraries created by their companies (e.g. Play, Akka) and by the learning materials, both of which lean heavily on plain Scala without going off the deep end with FP libs.
> If you need to know category theory concepts like Monad / Semigroup / etc. in order to understand your code, you're not doing regular Scala, you're doing Haskell-style FP in Scala
FWIW, "Semigroup" is not a "Haskell concept" either. Equally, it's a facet of specific Haskell functional programming libraries, and not Haskell itself. Granted, Monad is baked into the language (as do notation).
> I think a lot of criticism of Scala comes from the functional paradigm.
Which functional paradigm. There are at least two in common usage in the Scala community. Odersky's vision was an ML style FP. And now ML patterns are common in modern PLs.
Working in a single language across frontend and backend is amazing, especially when the language is so nice. Sharing models, codecs, validations, etc. And again – all of that in a very friendly language. Scala's expressive yet safe type system is very good at describing the business domain, encoding constraints, etc.
The only weakness of Scala.js I would say is it takes a bit more effort to integrate with JS libs. The mechanism is the same as with Typescript – just need the type definitions, but in practice it needs a bit of manual work. It's not a big deal though because with Scala.js you don't really do the 200-npm-dependencies thing that so many JS projects are cursed with. Lots of stuff comes with the language or from nice Scala libraries, including immutable data structures, powerful collections, validations, state management, etc.
Scala has somewhat of a reputation for being complex, but the language itself is ecstatic in its simplicity and elegance. The problem historically lied in certain functional programming libraries that require a certain formal / academic mindset to work with. They did become more ergonomic and better documented with time, but those are still very advanced concepts for most devs. I did work with such a codebase, and I have to admit it was not the easiest. But that was before AI – nowadays it's a lot easier for me to figure out these things. But I don't need to, at my current job we don't use them. So I would advise to learn Scala the language before going off the deep end into hardcore FP libraries. That's a completely optional destination that you don't need to force onto yourself if that kind of style doesn't jive with you.
Speaking of AI, I've been asking both ChatGPT and more recently Claude about Scala 3 and about functional programming libraries, and they're pretty good. I don't "vibe code" so don't know about that, just asking for code snippets or for explanations.