Six Years of Rust
blog.rust-lang.org
blog.rust-lang.org
I really enjoy programming in it, and I sincerely hope I'll manage to use it at work soon. Some years ago, I managed to write one component of a data processing pipeline with it, and it worked well, but the whole project ended up being scrapped because of unrelated reasons. Using Rust was possible because the project was really small, so I had a lot of freedom in choosing the technologies, but at the time the ecosystem and the human part of the equation wouldn't have scaled.
I think the time is significantly more ripe now. The biggest hurdles are no longer in the language itself or the tooling or lately even because of ecosystem limitations, but rather, inertia and concerns about whether there are enough people who know it, and even that is improving rapidly.
It's like C, but not C? I love it.
Go was fascinating to learn, precisely because it looked like C, but it wasn't. Another aspect that makes me love Go is its minimalism and concurrency features.
I also used to enjoy C++ and Java quite a lot for larger projects, so tell me, can I expect Rust to somehow remind me a bit of Go in comparison to C++ and Java? In other words, a simpler, more concise and more enjoyable to use version of C++ for instance?
Nope. Go and Java are about on the same "complexity plane" (Java is there 20 years later and having made different choices obviously, but the original java was not so different).
Rust is a much more complex language, in large part due to its purpose. It's often compared / conflated with Go because they arose around the same time, because the initial versions of Rust were much closer to applications languages (and Go e.g. runtime, green threads, segmented non-C stacks, …), and because Go's designers misleadingly called Go it a systems language.
Rust is more like taking OCaml, or Haskell, painting it in a C/C++ livery, and making it suitable as an actual replacement for C with all that implies.
I think one definition of what a systems language is one that you would use to write operating systems. I'd also call K8ts an distributed operating system and Hashicorp tools as components of one. Doesn't seem a huge stretch to call Go a modern systems language.
Sure.
> I'd also call K8ts an distributed operating system
K8S is less of an OS than systemd, and systemd is not an OS.
I mean you can call a pebble a raccoon if you want.
> Doesn't seem a huge stretch to call Go a modern systems language.
Then nothing isn't a systems language, and congratulation you've pasted one more word into complete meaninglessness. Thanks, but no thanks.
Systems language has a specific meaning and Go doesn't fit that criteria.
That's actually a very good point. I think a lot of people forgot about it (I did).
Java started very simple and then it just got enterprisy frameworks and best practices. I'm wondering how Go will look in 20 years.
But I'd never put it in the same tier as a completely different programming model like functional programming. It's still fundamentally a procedural language. Coming from C, I found Rust simpler than idiomatic modern C++, for instance.
Go is way more minimalist and easy to quickly get some code going.
Rust has a lot more moving parts when writing, so it takes more thought to write, but it’s great for large projects because it’s fast and its features make it scalable (with a lot less worry about bugs).
I believe more appropriate is comparing it to C++ since Rust is a higher level language than C.
[1]: https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-repl...
(And all of the previous posts he’s made on this subject)
But the line some people espouse is “Rust is a new C++ not a new C and C programmers who don’t like C++ would never like Rust,” and while some folks do feel that way, it isn’t universal. That’s all I’m saying.
C programmers are numerous and in a variety of fields doing all sorts of things, pretending you can speak about this stuff as though there’s a monolith of opinion is a category error, in my opinion.
Oh, okay. I understand the point you're making.
When I said "It's like C, but not C" I meant that it can be used for the same applications as C but it doesn't have most of the shortcomings of C itself.
You can do those things in C++ as well.
For a while C++ was a superset of C. It was basically C with OO and high level data structures.
That's what rust provides as well.
https://ferrous-systems.com/ferrocene/
https://security.googleblog.com/2021/04/rust-in-android-plat...
More adoption for low-level, embedded, and safety critical domains will help Rust to mature in these domains and provide competition and new developments where there is too much complacency and stagnation.
> Can I for example compile with the latest Rust compiler 1,2,..6 year old code?
Yes.
There have been some backward incompatible changes, but those are opt-in. So it wouldn't affect you.
Typo?
There are very few cases when a global mutable is good. Usually these arise in things like embedded or kernel code that by definition is only run as a single instance or if you need something like a global random number generator or global singleton access to something by definition unique.
Even in the latter cases it makes me itch a little.