HN user

Sunscratch

18 karma
Posts1
Comments22
View on HN

Here’s the thing: I don’t read code anymore. I used to write code and read code. Now when something isn’t working, I don’t go look at the code. I don’t question the code. I either ask one of my coding agents, or - more often - I ask myself: what happened with my system? What can I improve about the inputs that led to that code being generated?

Good luck debugging any non trivial problem in such codebase

I’ve created a small utility script at work that automates some routine tasks and nicely formats the collected data in a table, and I can say that Nushell is an amazing tool.

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.

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.

Evolving Scala 1 year 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.

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.

While it is very fun to hack using dynamically typed languages, it’s obvious that they are not suitable for large enterprise systems. Refactoring, code navigation, code reading is much much more better with statically typed languages. Moreover, modern ST languages like Scala have a “feel of” DT languages due to type inference, without compromising static type checking

Well, Bitcoin and other crypto garbage should be banned. It’s already obvious that it’s mostly used for money laundering and price gambling. It’s very environmentally unfriendly, and non efficient piece of technology.

Scala 3.0 5 years ago

Amazing work. Scala language and it’s ecosystem are amazing. Thanks to Odersky and all contributors, early adopters.

Software Industry is a young industry and complex, like any other profession, and a developer need to think about lots of other things as well, not just the language and possible pattern/syntaxes it has to keep up with!

Looks like you’ve chosen the wrong profession

7 month ago received an offer to join Scala project. Before that worked with Java and Go. I would say Scala is an amazing not just language, but an ecosystem. As a language, it’s very ergonomic and allows to do complex things with less boilerplate. So if you really interested in programming, learning new concepts - I would recommend to try it. If you want just to do boring stuff for money - Java and Golang. Regarding Kotlin - it doesn’t intersect with Scala, because mostly used for Android and back-end with Spring or other Java frameworks. Scala is mostly used for distributed systems, big data and applications with complex domain.

When you’re choosing Scala you have all the perks of JVM platform. You can reuse Java libraries if needed. Scala has pretty powerful type system. JVM in turn is a pretty good platform, with decades of effort, which can tolerate high load, make different optimizations in runtime, tolerate large heaps if needed, GC story in Haskell runtime is not even close to JVM.