Live data from Hacker News

Rust 1.53

blog.rust-lang.org

71–80 of 98 posts

Re: Rust 1.53

#71

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

If you consider GitHub to be a reasonable metric of industry practice in general, then judging by these charts [https://madnight.github.io/githut/#/pull_requests/2021/1], I would say that going mainstream in a couple years is not very likely at all. Tiobe [https://www.tiobe.com/tiobe-index/] paints a similar picture. The number of Rust-specific jobs advertisements also don't seem to suggest a coming wave that employers are trying to get ahead of[https://www.dice.com/jobs?q=rust&countryCode=US&radius=30&ra...]. I'm not aware of any real success stories with the language, either, unlike Go and the CNCF ecosystem that's the latest fashion right now. There are rewrites of GNU coreutils (ripgrep, bat), a couple components in already commercially successful software (Dropbox, Discord), a couple side-projects within large companies (fuschia OS, FirecrackerVM) and I guess terminal emulators are a big focus. You could say the same of Haskell, which is very cool, but is not going to be an industry standard in the foreseeable future.

One way to think about it is that the big wave of new languages like Go, Rust, Elixir and Kotlin all sprang up around 2010. At that time, C99, C++03, Java 6 or C#2 were probably what you would have been using (honorable mentions to Python 2.7, PHP 5, and Ruby 1.8). The new languages were perceived solutions to the limitations of the mainstream languages; however, today, very many of the new features and the old points of frustration have already been addressed within these same 'boring' mainstream languages. Java 16, C# 8, and C++20 are vastly improved and have (or will soon have [check out Loom for Java!]) almost all the conveniences the new-wave offered without having to throw old programs in the bin and reimplement entire ecosystems. C++ and Rust are also so similar in terms of semantics and memory model, that I really don't see the value proposition of walking away from huge, mature projects like Qt for academically interesting type algebra. There have been some ambitious fresh-takes on things like ECS-based game engines in Rust, but I'm not aware of impending migration to these tools.

Re: Rust 1.53

#72

Earlier quoted context omitted.

Rust is great as a hobby language, as it tickles some previously unutilized brain patterns. I don't think it's a great replacement for Java/C#. Unless your problem is GC pauses, either language will let you be more productive even when you master the borrow checker simply because their ecosystems are much richer. I can imagine AAA game engines slowly migrating from C++ to Rust, but enterprise applications are already…

> their ecosystems are much richer. The Rust "ecosystem" can seamlessly expand to include any language with a C ABI and FFI. Solutions are also being developed to ease interop with managed platforms like Java/C#. Contrast this with something like Go, where even interoperability with C does not come out-of-the-box and requires compromising the most desirable features in the language itself.

Can be, yes. Seamless, no. In the best case where the api uses very old fashioned c without many pointers it's an extra afternoon at least. (I've written high level bindings for a few small libraries for hobby projects)

Re: Rust 1.53

#73
post #27

Earlier quoted context omitted.

Rust is great as a hobby language, as it tickles some previously unutilized brain patterns. I don't think it's a great replacement for Java/C#. Unless your problem is GC pauses, either language will let you be more productive even when you master the borrow checker simply because their ecosystems are much richer. I can imagine AAA game engines slowly migrating from C++ to Rust, but enterprise applications are already…

Nitpick, but GC pauses are basically no longer a problem with low-latency GCs like ZGC or Shenandoah in the JVM.

Sigh, don't take your use case of GCs and apply it as a rule to others.

I work in telecoms on the layer just above the FPGAs/DSP: even a 1ms 'pause' would be totally unacceptable here..

Re: Rust 1.53

#74
post #73
post #27

Earlier quoted context omitted.

Nitpick, but GC pauses are basically no longer a problem with low-latency GCs like ZGC or Shenandoah in the JVM.

Sigh, don't take your use case of GCs and apply it as a rule to others. I work in telecoms on the layer just above the FPGAs/DSP: even a 1ms 'pause' would be totally unacceptable here..

I think you are way overthinking my comment. I just added a note that for regular, user-space applications there really is no longer a reason to use low-level languages even if latency is important.

Of course embedded will always exist, as well as specialized programs requiring utmost control over the machine.

Re: Rust 1.53

#75

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

As somebody who's worked mostly in very high level "loosey goosey" languages (Ruby, JS) for several years, I had a lot of fun learning Rust. I've still only used it for trivial things but it's an eye opener.

When I was in college, they taught C++ as the programming language (dating myself here...). I walked away with enough negative feelings about it that I thought I just hated strongly typed programming languages that lacked garbage collection, and I thought I hated compilers that spewed errors all the time, and so I gravitated towards things like Python and Ruby.

Rust has proven that I was wrong about myself. I really enjoy working with it - rust has many of the same features but dramatically modernized, and it solves so many ergonomic nightmares that I remember from C++.

With rust I find that entire classes of mistakes I can make with Ruby are straight up impossible because the compiler won't let you get away with it.

If you were scarred by C++, give it a shot, and it may erase some of those old battle scars.

Re: Rust 1.53

#76
I'm a little OT (sorry), but I am wondering if is there a way to learn Rust while keeping up with the changes made from last edition (Rust 2018, which is 1.31)?

Re: Rust 1.53

#77
post #76

I'm a little OT (sorry), but I am wondering if is there a way to learn Rust while keeping up with the changes made from last edition (Rust 2018, which is 1.31)?

Not specifically, changes since then have landed in all editions. We did have a doc that described the full set of changes, but people didn't like it, so it got removed.

Re: Rust 1.53

#78

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

Rust is great as a hobby language, as it tickles some previously unutilized brain patterns. I don't think it's a great replacement for Java/C#. Unless your problem is GC pauses, either language will let you be more productive even when you master the borrow checker simply because their ecosystems are much richer. I can imagine AAA game engines slowly migrating from C++ to Rust, but enterprise applications are already…

Enterprise applications are already fast enough, but memory footprint can still be a real pain. Monitoring and deploying the JVM isn't easy, and I think there is absolutely room in the future for lower footprint deployments in the enterprise space. Golang has already seem some limited adoption, but has a limited type system that doesn't easily allow expressing complex business logic. Rust has the possibility to really shine here, even if it doesn't eat the enterprise world.

Re: Rust 1.53

#79
post #61
post #9

Earlier quoted context omitted.

Personally, I'd say it's worth it now. I've been dabbling in Rust for a few years and while I still don't get to use it at $DAYJOB it's been a huge benefit to me. Those "esoteric" concepts have bled into other languages and my usage of them, making me a better programmer overall. Read a chapter of "The Book" once a month or so over the next 3 years and I wager you'll find yourself in a better place than had you waite…

After doing a couple of projects with it, I have found that learning Rust is an exercise in futility. I wish I had never heard of Rust. What will happen is you'll immediately recognize it as the greatest language ever invented and you'll want everyone else to know about it. You will try to convey what it is about Rust that makes all other languages obsolete, but they will look at you like you're a crazy person. You w…

Sounds like everyone I've known that learned Lisp or Erlang or Haskell.....

Re: Rust 1.53

#80

Earlier quoted context omitted.

> Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read. The Julia community has been trying really hard to convince people that this is a good idea and I'm still not on board with it.

It helps here to have good shortcuts (i.e. \tex like commands) for all the symbols. Otherwise writing them is a PITA and nobody will do it (e.g. Go supports full unicode identifiers, when was the last time you saw one in the wild?)

> Go supports full unicode identifiers, when was the last time you saw one in the wild?

Back when someone used them to add pseudo-generics https://old.reddit.com/r/rust/comments/5penft/parallelizing_...

Post reply on HN