What Language Should I Learn After Rust?

Which Programming Language Should I Learn After Rust

What are your suggestions?

What other languages do you already know ?

JavaScript, Python and I have experience in many languages ​​but forgot most of

It wouldn't hurt to learn a bit a of C then. Java and C# would also expose you to different things. Maybe after that get back to the functional paradigm with OCaml or Haskell.

1 Like

It really depends on what sort of application fields you are looking at, and which properties you are interested in.

I feel like Haskell can help you gain more background knowledge in functional programming and type theory. This could also come in handy to get a better feeling for things like HRTBs in Rust, or things like type constructors.

If you are interested in low-level programming and operating system interfaces, then C might be a good thing to learn (it might also help you to get more familiar with some things regarding unsafe Rust and Rust's foreign function interface).

I personally don't like Java, but maybe Kotlin could be worth looking at? (Never used Kotlin myself, so I can't really say. And I don't think it's nearly as nice as Rust :grin:.)

In a Windows context, you might probably go for C#, but I have never used that either.

Something entirely different from Rust would be Lua (dynamically typed, very lightweight implementation, and interpreted). The compressed source code of Lua (implemented in C) is less than half of a megabyte in size (smaller than most Rust binaries you would ever compile).

6 Likes

I'd say a functional one. OCaml might be interesting as it was one of the major inspirations for Rust (and the language in which Rust's first compiler was written), but SML or Haskell would also be reasonable options.

you dont. you simply rewrite everything in rust from now on ;-). jokes aside. python and js are quick to learn if you know rust. But C#, Java are always nice to know. depends on what you want to build

If you want to go lower-level, you could look at an assembly language, which will give you a lot of insight into what’s going on under the hood of all the programming languages you already know. Even lower level than that would be something like VHDL or Verilog, which are specialty languages used to design CPUs and other complex digital circuits.

3 Likes

Backus–Naur form.

2 Likes

I feel like better knowledge in assembly can be really helpful to understand better what "happens under the hood" (e.g. ABI). I have done a bit of assembly for fun many years ago, but that was on 8-bit microcontrollers only.

I wonder what the motivation behind that question is.

Is there something you need or want to do that you feel is not doable in Rust?

I'm all for programmers learning a section of different languages. Preferably languages that emphasise different paradigms of approaches to problem solving. So that one gets a different view of programming. At the end of the day there are practical, real world, jobs to be done.

Anyway currently, having been through many languages over decades, I have landed on Rust as Javascript as my favourite languages. They are polar opposites but, which sounds odd, but perhaps that is the attraction.

I'm old school. I think every self respecting programmer should tackle assembler at some point. I'm not suggesting one should actually use assembler unless it is really necessary, but I feel it's good to get away from the towers of abstraction people build on top of computers and get a feel for what really goes on in the engine room.

2 Likes

Try learning Aussie++.

1 Like

actually all I wanted to do was love a language to improve myself in the backend area after rust but couldn't decide

And I also have a question, will writing a simple scripting language with rust help me improve myself in rust?

What is your idea of "backend area"? I have processes in the cloud, I guess one might call that "backend", that need to be as reliable and efficient as possible. Throughput and latency are key metrics. As is availability and correctness.

Do you mean to actually write an interpreter for a simple scripting language in Rust?

If so, I think that is a very good exercise in mastering Rust.

Yes I want to write interpreter or compiler in rust language. I want to do this to fully master it is that a good idea?

A cool other style of language that hasn't been mentioned yet is the Forth family. I admire the simplicity, but don't dare actually use it...

2 Likes

If you have experience writing compilers or interpreters, dive in... If you do not have experience writing compilers or interpreters, you might want to start your rust journey on something less complex.

That is most probably sound advice. However if one knows nothing writing interpreters/compilers it is possible to get started in a very simple way. Just follow " Let's Build a Compiler" by Jack Crenshaw: Let's Build a Compiler in which he describes lexing, parsing, interpreting, code generation along with example code in Pascal. All of which turns out to be amazingly simple.

Some years ago I worked through that and implemented the ideas in C rather than Pascal. Ended up with a compiler that generated code for x86 and the Parallax Propeller MCU. Totally suboptimal code mind, but I was amazed that I could get from source to executable at all!

I have sometimes day dreamed about doing that again in Rust just for exercising some Rust chops.

2 Likes

I'm interested in hearing more about this. I personally used to hate JS, but for the web, the tooling (JS repl in the Chrome Dev Tools console) is just unbeatable.

I don't think anyone mentioned it, and I didn't think of it at the start: PHP.

Making a simple http backend with apache and php, that's a programming model rarely seen anywhere else. The language has many thorns to learn (which is good here), the ecosystem is very simple. The create-destroy-world model on each request is very clean.

Often disregarded (in large part rightfully), I think it's fine ecosystem to learn. The language is largely composed of technical debts, but the mindset for the web and its share of active web servers is very important.