←back to thread

253 points chhum | 3 comments | | HN request time: 0.755s | source
Show context
nelup20 ◴[] No.44009800[source]
I personally appreciate Java (and the JVM) much more after having tried other languages/ecosystems that people kept saying were so much better than Java. Instead, I just felt like it was a "the grass is greener" every time. The only other language that I felt was an actual massive improvement is Rust (which so far has been a joy to work with).

It's a shame imo that it's not seen as a "cool" option for startups, because at this point, the productivity gap compared to other languages is small, if nonexistent.

replies(6): >>44009912 #>>44009928 #>>44009952 #>>44010109 #>>44010282 #>>44010468 #
bsaul ◴[] No.44009952[source]
Funny. I've been trying rust for the past 2 months fulltime, and i'm really wondering how you can call it a "joy to work with" when compared to java, at least for server development.

Rust feels like walking on a minefield, praying to never meet any lifetime problem that's going to ruin your afternoon productivity ( recently lost an afternoon on something that could very well be a known compiler bug, but on a method with such a horrible signature that i never can be sure. in the end i recoded the thing with macros instead).

The feeling of typesafety is satisfying , i agree. But calling the overall experience a "joy" ?

replies(5): >>44010045 #>>44010053 #>>44010107 #>>44010130 #>>44012365 #
mynameisash ◴[] No.44010045[source]
> I've been trying rust for the past 2 months fulltime,

> recently lost an afternoon on something that could very well be a known compiler bug

With respect, at two months, you're still in the throes of the learning curve, and it seems highly unlikely you've found a compiler bug. Most folks (myself included) struggled for a few months before we hit the 'joyful' part of Rust.

replies(4): >>44010298 #>>44010342 #>>44010401 #>>44011452 #
johnisgood ◴[] No.44010298[source]
Okay, but I have hit the joyful part of some other languages long before a few months. What gives?
replies(1): >>44015981 #
1. asa400 ◴[] No.44015981[source]
Rust is genuinely novel, so for most of us its going to be less familiar, so it will take longer to learn. It's not like learning Python if you already know Ruby, for example. The upside is that it offers some pretty great guarantees you can't (yet) find elsewhere. If you want those guarantees it will be worth it, if those guarantees don't matter to you, it may feel like a slog.
replies(1): >>44016595 #
2. johnisgood ◴[] No.44016595[source]
What guarantees are you speaking of exactly?
replies(1): >>44017351 #
3. asa400 ◴[] No.44017351[source]
The banner one is memory safety without garbage collection. This enables is a terrific degree of library composition. Unlike C/C++, you can generally expect that libraries you pull in will also be memory safe.

The other one is thread safety, due to the compiler-enforced ownership semantics that prevent threads from accessing shared data unless they do so in a well-defined way.