4 ms·
Scala * Getting nullability right - Tick. * "Algebraic" (Sum and Product) data types. Tick. * Errors as values - Tick. * Focus on the data - Tick. * A nice
by jmfldn 4y ago
Scala
* Getting nullability right - Tick.
* "Algebraic" (Sum and Product) data types. Tick.
* Errors as values - Tick.
* Focus on the data - Tick.
* A nice development experience - Tick (has got a lot better in recent years).
* Vibrant and growing community - Tick. Hard to know if it's growing, but it feels like it has a very stable niche imho. I see a lot of dynamism in the communities I follow like Typelevel.
* Can develop comfortably on Mac, deploy to Linux. Windows support a "nice to have. Tick. I've developed on all of these environments.
Is it a "higher level Rust?". It's a very different beast but, based on your checklist at least, it fits the items them than most other mainstream languages imho.
- hedora 4y agoDoesn't scala inherit type erasure from Java / the JVM though? That means nullability and sum and product types can never be sound in it, and every line can throw some unexpected exception (just like Java), right? On top of that, the classloader makes an open world assumption, at least with the JVM, so the compiler can never prove me wrong on any of the above points, regardless of what program it's been handed. Anyway, I've been there and done that with Java, and I'm hoping to never put up with that ecosystem again. I'd much rather fight the borrow checker than deal with null pointer and class cast exceptions in production.
- otter-in-a-suit 4y agoIt does, but scalafix helps to avoid some of these issues. I’m not sure how important a very opinionated compiler is to you, but a compiler that does what it can + a good linter isn’t the worst combination. Once you tap into the Java ecosystem, you can often wrap things into the typelevel ecosystem and work with effects. Generally, Scala with cats/cats-effect is quite pleasant.