Which languages are worth learning as a Rust programmer?

Maybe Lean? It's not as general-purpose as Rust, but has more powerful metaprogramming (think proc macros but with type information). Also, I think proofs and in particular dependent types could be part of Rust's (distant) future, e.g. instead of having to trust unsafe code, you would be able to prove that it's actually safe - and learning Lean could give you ideas how that could possibly work. (Yes, so could Agda, but minus the fancy metaprogramming.)

As a long-time C++ developer, I'd say: not C++. Everything will just feel annoying, coming from Rust. :wink:
(That said, learning a language is never a bad idea.)

4 Likes

Python that is not a big deal and then Maturin. This allows to wrap Rust into Python packages making you friendly with Python supporters.

2 Likes

Everything depends on the domain you want to grow in. Rust is a general-purpose language, but still fairly specialized. If we take Rust as the point of reference:

For blockchain — Solidity.
If you’re designing your own language but aren’t in a position to build a full compiler, you can look at how Rust was initially created using OCaml.
If you’re doing frontend—or blockchain as well—JavaScript (TypeScript, a web framework) will be practical.
Python wouldn’t be a bad choice if you’re developing complex, high-performance workloads in Rust (e.g., an LLM) and want fast prototyping in another language.
And of course C/C++ if you want to keep a broader scope and simply use FFI to tie together lots of existing solutions and adapt them to your needs.

Everything else is far enough from Rust that it diminishes the value of your skills in this language.

Learning Swift is fairly easy after Rust. Your program will work instantly and you do not need crates.io, because Swift already has everything in. I assume you already know assembler of 8086 or Arm. I know also PDP 11, but not many people use it in the current days.

Rust does give me these butterflies, but I want to learn something else for the sake of doing it while also knowing one that's useful sometimes. I already looked at Go until I saw the module system, will keep it in mind anyways. Thanks!

Thanks, this list sounds really interesting!

ok

Hm, I probably won‘t learn Java, learning it at school is enough for me :sweat_smile:

I completely forgot assembly, I already wanted to learn it. When dealing with Rust wasm I‘ll need to deal with it, yeah, although I do not see the point of learning C when I know Rust which - as you said - is tuned for interfacing C.

This guy bought one and restored it. What did you use it for?

Thanks for the extensive List Uiua looks extremely interesting!

Yes, I think I am very lucky to have been able to learn Rust as my first language instead of C++, I‘ll definitely look at Lean, I like the concept

C is so fundamental I can't imagine not using it :slight_smile:

Jens Gustedt's "Modern C" is out recently in 3rd edition - a good read. Describes C23.
C has come a long way since K&R.

1 Like

But what‘s the advantage of C over Rust if Rust has nice FFI?

Thank you all for your answers, here‘s a list of all of the languages mentioned here for people with the same struggle:

  • JS
  • Lisp (Closure/Steel)
  • Haskell
  • Assembly (RISC-V)
  • OCaml
  • Gleam
  • Go
  • Erlang
  • Standard ML
  • Kitten / Factor / concatenative Languages
  • WASM (directly, not Rust)
  • Rocq Prover
  • Pure
  • Scheme
  • Pascal
  • Verilog / VHDL
  • Prolog-like (Scrycer)
  • Forth-like
  • APL-like
  • Prover-like
  • Uiua (Forth-like / APL-like)
  • Nushell (for big amounts of data)
  • Agda (Math)
  • Lean

​

1 Like

By the way, are there resources for learning Haskell as a Rust programmer? I didn‘t find any.

I don't see much in Rust that distinguishes it from other imperative languages when learning Haskell, save perhaps the use of patterns and algebraic types, which are less common. The most "shocking" part is expressing algorithms without that step-by-step description and mutable variables, but using recursion, list comprehension, and pattern matching instead. And that's the same big change when you come from those other languages.

You could ask that on their reddit, though. There have been a few questions comparing both languages in the past.

Had you done the opposite journey, you could have read Rust for Haskell Programmers :wink: (only kidding, but that site has Haskell tutorials, though I've never checked them out).

Programming in Haskell by Graham Hutton is a good book to learn.

1 Like

Well, that will keep you busy

Just a little correction for VHDL: like Verilog, it's also a hardware description language. It's something entirely different from software programming, so I'm not sure it has its place here; you'd need to learn the basics of digital microelectronics: at least what flipflops are, combinatorial circuits, how they can be reduced to layers of NANDS or equivalent, finite state machines, cross clock domains, timing closure, how to describe a digital system with Verilog or VHDL, the difference between behavioural and implementable description, and how to write a testbench.

You don't really need an FPGA board (definitely not just an FPGA, which is just a chip), except if you wanted to implement your design and see it running for real, but that comes with a bunch of other things to learn (and its own cost). You'd also need the cables to program the board.

You can limit yourself to simulating your design and checking that it works with your tests; you can also see the waveform outputs. For small designs, you can install the free version of one of the design kits developed by Altera (now Intel, which acquired them about 10 years ago) or Xilinx. There might be others. There are open-source equivalent, but in my experience they're not very good or user-friendly (it's been a while, so it might have changed).

It‘s just a list to look at if I (or someone reading this post) wants to learn a new, maybe unique language

1 Like