6 ms·
Scala used to be my hobby / enthusiast language. Introduced to it through a college course, and used a bit through school. Later, I would use it for Advent of C
by caterama 2y ago
Scala used to be my hobby / enthusiast language. Introduced to it through a college course, and used a bit through school. Later, I would use it for Advent of Code, tinkered with a Scala Play webapp, and dream about using it professionally. Rust has almost completely filled that void now. Rust is native, I'm not waiting on the 1.0 release of `scala-native` anymore. The community around Rust seems to be enthusiastic and growing, as opposed to languishing for Scala. I hold some reservations about Rust in terms of how complicated it is. Despite having used it for an amount of time that I would be feeling comfortable in most languages, I am still not comfortable and continually encounter _stuff I don't understand_.
RIP Scala, I will miss you! You showed me the joy of pattern matching, functional OO, currying, how to use `map` `flatMap` `fold`, etc. All things with continued influence! <3
- threeseed 2y agoI have been writing Scala and Rust everyday for the last few years. I actually don’t see the two overlapping all that much. Rust is a terrible backend language compared to Scala/JVM. When you are dealing with real world concurrency i.e. error/thread management Rust’s memory management model becomes unusably complex very quickly. And the entire ecosystem lacks maturity i.e. the majority of libraries I use are not at version 1. Whereas from Scala you can just use any Java library e.g. Vertx, Spring almost all of which have commercial, enterprise support and continue to be proven time and time again. It almost always just works. Rust’s strength is in desktop apps e.g. Tauri and low-level programming.
- packetlost 2y ago> When you are dealing with real world concurrency i.e. error/thread management Rust’s memory management model becomes unusably complex very quickly I've seen this several times, but having built several highly concurrent applications in Rust, I just don't agree. Building a concurrent Rust application the wrong way is certainly complex, but if you know how Rust's strong opinions on how to structure an application work, it's downright pleasant. Except async. Rust's async story still sucks and should be avoided as much as possible.
- threeseed 2y agoCompare this to Scala and it just doesn't matter about right/wrong way. It all just works without issue. Maybe you use a few more CPU cycles garbage collecting but these days it's unnoticeable.
- packetlost 2y agoI'm not speaking bad of Scala or the JVM: I actually agree. When the GC and overhead don't matter, a JVM language is an absolutely fantastic choice. I was more commenting that Rust can be simple if you architect it right, that's all. I've mostly come to the conclusion that a mediocre engineer can write performant enough Java/Scala/Clojure/Kotlin/etc. Usually even more performant than what an inexperienced/mediocre C/C++/Rust engineer could write and have an easier time doing it. However trying to ilk out the last bit of performance in a JVM language can be very challenging.
- estebank 2y ago> And the entire ecosystem lacks maturity i.e. the majority of libraries I use are not at version 1. I'm marginally bothered by the reluctance to bite the bullet and accept a 2.0 will happen in the future, but version numbers do not make for mature libraries. There are plenty of foundational libraries written in C keeping Linux desktops running that are permanent 0.x versions. > Whereas from Scala you can just use any Java library e.g. Vertx, Spring almost all of which have commercial, enterprise support and continue to be proven time and time again. I find that "wide and storied library ecosystem" can be a double edged sword: an old library can either be battle-tested, or just old (with cruft or poor design or implementation) and you can't always tell which it is ahead of time. This is true for libraries in any language, and the same thing will happen to Rust in 10 years.
- threeseed 2y ago> but version numbers do not make for mature libraries No but they do symbolise a belief amongst the library maintainers that it isn't stable. And so I end up spending an inordinate amount of time refactoring for the latest version. > and the same thing will happen to Rust in 10 years From what I've seen in the last year it won't. Most of the libraries I use have stopped being maintained. The reason Java does so well here is because in enterprise space supporting something for decades is common.
- Sunscratch 2y agoI double that. Rust is great language, and I like it a lot. But usually I pick Scala whenever I can, it’s perfectly suited for complex domain. So my rule of thumb is: Large enterprise monolithic projects - Scala. Microservises, serverless functions, systems where resources have hard constraints, cli apps - Rust. Both are great languages.
- markus_zhang 2y agoI work in data engineering and Scala fades even in this field.
- flakiness 2y agoWhat's used instead? Python? (complete outsider, just curious.)
- joshlemer 2y agoYes. Java, Python.
- flakiness 2y agoOk so boring things won. (Well I'm writing Java and Python every day outside Data context this is not dissing.)
- markus_zhang 2y agoJust curious what do you do? I'm thinking about moving away from data, maybe into something that is a little bit lower-level.
- flakiness 2y agoJava (+Kotlin) for Android, Python for its automation and tooling (and obviously, data.) These aren't very low-level - For Android there is always C++ if you want to go down to metal.
- markus_zhang 2y agoAh that's interesting. And there is ofc Swift and ObjC for Apple devices. Maybe I should get into app dev. Thanks. Do you think there is a strong market of Android/iOS native app development? As a DE I don't think my previous experience worths much -- maybe a bit more when we move to Flink which uses Java, and the might would rather hire new graduates instead of me.
- joshlemer 2y ago> Scala Play webapp I feel like the biggest misstep that the Scala ecosystem and Typesafe/Lightbend did was that they didn't invest more in Play Framework. 10 or 12 years ago, Play had a lot of energy and momentum, and it's a kind of thing that has broad enterprise/start up appeal. But focus was always more on Akka and what seemed like really niche architecture astronaut stuff like Actors and Actor System Clusters and Event Sourcing etc, rather than getting the basics to be super ergonomic or productive. If they had keep just making Play Framework better and better and focusing on the practical problems that every web service faces, they could be in a similar great position as Laravel is in today or any of the many Rails/Laravel consultancies.
- rco8786 2y agoTotally agree. I wrote a few Play apps way back when and really enjoyed it. I was so excited about the future of the framework and how it would beat out Java for web apps, and steal folks away from the Rails ecosystem. And then it just…stopped. Not sure what happened there honestly.
- lmm 2y ago> I feel like the biggest misstep that the Scala ecosystem and Typesafe/Lightbend did was that they didn't invest more in Play Framework. 10 or 12 years ago, Play had a lot of energy and momentum, and it's a kind of thing that has broad enterprise/start up appeal. But focus was always more on Akka and what seemed like really niche architecture astronaut stuff like Actors and Actor System Clusters and Event Sourcing etc, rather than getting the basics to be super ergonomic or productive. I'd say the opposite. They pushed Play a lot. But it was never a killer app, and it never even really leveraged the strengths of Scala. People and especially companies don't switch languages for "super ergonomic and productive". They switch because they want to do something they can't do in their current language. I'm not a fan of Akka or Actors, but it made for some incredible demos that you really couldn't do in anything else except Erlang.
- hocuspocus 2y agoThat is correct. Play's hype did more harm than good. I work at a company that has many legacy projects in Scala because we were/are heavily invested in Spark, and Play is a disaster overall.
- drdude 2y agoI thought I was reading my own story! same here... 10 years of Scala 2.xx till it was Scala 3 that caused my withdrawal, and that infinite waiting for scala-native... killed my interest. Now, and for the foreseeable future, it is Rust. I had a look at Mojo, love it, but I am no longer interested in OO (used OO for 20+ years and I figured I am no more interested). EDIT: even John DeGoes (the ZIO guy) left Scala for similar reasons, now I just remembered, and prefers Rust over it... I love what they are doing with their Golem Cloud.
- Sunscratch 2y agoI would argue that John left due to political reasons mostly, and honestly, for good.
- drdude 2y agoTrue, but his article (https://degoes.net/articles/splendid-scala-journey https://degoes.net/articles/splendid-scala-journey) states it is also for Scala new syntax breaking a lot of things (if I remember correctly, been a a while since I read it) and for other reasons. I also thought it was for political reasons before until I read that article back in time.
- AzzieElbab 2y agoJon DeGoes still works on the ZIO ecosystem along with his Rust projects.
- drdude 2y agoTrue, I never implied otherwise. When I commented, I was referring to things he said in his article: https://degoes.net/articles/splendid-scala-journey https://degoes.net/articles/splendid-scala-journey
- hackingonempty 2y agoIt depends on what you want to do, of course, but for back end servers the Rust ecosystem is relatively immature. There is nothing comparable to ZIO in Rust world, for example.
- margorczynski 2y agoWhat's more important than the current state is the direction where it's heading. Rust has energy, vision and momentum - additionally it has a powerful niche that it dominates. Scala has unfortunately fizzled out, I would say mainly because of incompetent leadership (or more precisely academia-driven) but also because the alternatives got much better since it got introduced (Java mainly). Which is a shame as it is a great language that offers elegance and great power.