Hacker News new | ask | show | jobs
by manx 1638 days ago
Scala 3
2 comments

May I ask what context you use it in? It looks like it strikes the right balance between simplicity and descriptive power - kinda like a statically typed python.

The web side of it seems rather different from a Flask or FastAPI setup, and it obviously doesn't have SQLAlchemy (which I really like). Do you have any recommendations on that front?

I'm using it mostly for full-stack web development with ScalaJS (https://www.scala-js.org) in the frontend (https://outwatch.github.io/docs/readme.html) and in the backend with AWS lambdas.

The ecosystem is currently in the process of porting all the libraries to Scala 3. So if you're new to Scala, I'd recommend to start with Scala 2, which is rock-solid and already very powerful.

I never worked with SQLAlchemy. But on the scala database side, popular libraries are Doobie (https://tpolecat.github.io/doobie) and Quill (https://getquill.io). Keep in mind that these are for Scala on the JVM. On the ScalaJS side I'm using the javascript library pg. But I'd like to try if it works well with Prisma soon.

The nice thing about ScalaJS is, that you can use Javascript libraries. And if there are typescript facades, then you can transpile these to Scala and use them in a type safe way (https://scalablytyped.org).

How has your experience been vis-a-vis Scala 2.x?
I'm in the Scala world for ~10 years and love the language. The language got so many design decisions right and slowly teaches you functional programming (which is not a must). The standard library with its collections is better than anything I have seen so far. I easily prefer it over Java, Typescript, Python, Ruby, Dart or Kotlin. Scala 3 just cleans up the language and brings type-level programming and macros to the next level.