Readit News logoReadit News
Sunscratch commented on Patterns for Defensive Programming in Rust   corrode.dev/blog/defensiv... · Posted by u/PaulHoule
Sunscratch · 22 days ago
Nice article. The problem of multiple booleans is just one instance of a more general problem: when a function takes multiple arguments of the same type (i32, String, etc.). The newtype pattern allows you to create distinct types in such cases and enforce correctness at compile time.
Sunscratch commented on The Origins of Scala (2009)   artima.com/articles/the-o... · Posted by u/todsacerdoti
Sunscratch · 25 days ago
I’m very happy that I learned Scala back in 2018(thanks to my colleague). I quickly realized that this is the language I want to use for work, and after some time, I joined my first Scala project. Five years later Scala is still my favorite language, along with Rust.
Sunscratch commented on Evolving Scala   scala-lang.org/blog/2025/... · Posted by u/pjmlp
pkolaczk · 9 months ago
1. Rust has had 10x better tooling right from the start. Cargo vs SBT, no joke.

2. Rust has improved its compiler performance by >3x in the last 5 years.

3. Rust hasn't gotten any major new language feature in the last 6 years. Most language improvement is improving orthogonality of existing features.

4. Rust has an excellent backwards compatibility story also right from the start. Code/libraries written in 2015 can be still compiled and used together with code from 2025.

5. Rust has a serious backing from all major IDE / editor providers.

6. Rust has integrates easily with other languages and ecosystems. It's easier to call Rust from Python than to call Scala from Python. It's easier and more performant to call C from Rust than to call C from Scala. Things like that. It's sad that Scala even struggled with interoperability with Java; which should theoretically be easy as it is the same platform.

Seriously, doesn't look to me like the same mistakes. It's actually quite opposite.

Sunscratch · 9 months ago
>Rust has had 10x better tooling right from the start. Cargo vs SBT, no joke.

Cargo is a really good tool, but I wouldn't say it is 10x better than SBT.On the other hand, Scala can be used with different build tools: Maven, Gradle, Mill. With Rust you have no choice(or I'm not aware of). Rust-analyzer is better than metals, can't argue with that...

>Rust has improved its compiler performance by >3x in the last 5 years

Rust compiler is very slow. I can't imagine what compilation time was 5 years ago, but even now, it is incredibly slow, even compared to "slow" Scala compiler(which is no longer true). I'm working on a little project with bevy, and even on such small project compilation time sucks. You can't compare it with Scala, it's just completely different experience.

>Rust hasn't gotten any major new language feature in the last 6 years.

That's not true. Rust team handles these changes correctly. Rust has concept of "Editions", and every 3 years new edition introduces significant changes. I really like how editions work, it's a great way to maintain backwards compat.

>4 Mostly agree

>5 Fully agree

>It's easier and more performant to call C from Rust than to call C from Scala.

Yep, but it's not Scala but the JVM limitation. JNI sucks, but there is an effort to improve that (project Panama).

Overall, both Scala and Rust are great languages. Rust team has addressed many typical issues from the beginning. Scala had its mistakes, but moving in the right direction.

Sunscratch commented on Scala 3 Migration: Report from the field   blog.pierre-ricadat.com/s... · Posted by u/AzzieElbab
drdude · a year ago
I 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 · a year ago
I would argue that John left due to political reasons mostly, and honestly, for good.
Sunscratch commented on Scala 3 Migration: Report from the field   blog.pierre-ricadat.com/s... · Posted by u/AzzieElbab
threeseed · a year ago
I 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.

Sunscratch · a year ago
I 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.

Sunscratch commented on Monocle: Optics Library for Scala   optics.dev/Monocle/... · Posted by u/curling_grad
ldjkfkdsjnv · a year ago
Every scala code base I have worked on, that wasnt written by small team of experts, turned into a huge pile of crap. A small squad of people that treat the language like a religion create an impenetrable masterpiece
Sunscratch · a year ago
Every <insert any language here> code base I have worked on, that wasnt written by small team of experts, turned into a huge pile of crap…
Sunscratch commented on OpenAI to become for-profit company   reuters.com/technology/ar... · Posted by u/jspann
Sunscratch · a year ago
Should be renamed to NonOpenAI,or MoneyMattersAI
Sunscratch commented on Show HN: SwimOS Rust – A framework for real-time streaming data applications   github.com/swimos/swim-ru... · Posted by u/swimos
Sunscratch · a year ago
Looks very similar to Akka, where agent is actor and Lifecycle is Behaviors.

An interesting project for a complex task - streaming stateful processing.

u/Sunscratch

KarmaCake day17June 12, 2018View Original