Rust 2024 the Year of Everywhere?



andrewstuart 6d
My theory is that every technology that is too complex gets replaced with something that does the same thing more simply. You see this relentlessly in the JavaScript ecosystem where waves of too-complex tools get rapidly replaced with something else, only to be swept away again when someone finds an even more simple way to do the same thing.

This must be the fate of Rust - eventually it will be replaced with a language that gives the memory and thread safety without the melt-your-brain complexity.

I want a simpler version of Rust.

It's too hard.

Is it possible to create a truly safe language without the dizzying complexity? Or is it the complexity a baseline requirement?

I wonder if there is a subset of Rust that can be extracted someone into a new, minimal language with the core benefits.

paulgb 6d
async drop is exciting because it means you can use the RAII[1] pattern for arbitrary resources. I've used this to, for example, manage infrastructure spun up for integration tests. I spin up a Docker container at some point in the test, assign the result to a guard variable, and then use RAII to clean it up when the variable goes out of scope.

Making it work without async drop was pretty hacky, so I'm looking forward to removing those hacks. Well done, Rust team!


robbintt 6d
I'm just sitting here learning c++.
Scarbutt 6d
Rust is so simple and elegant.
cutierust 6d
[deleted by user]
ilovecaching 6d
This is why Rust will eventually become the next C++ - it's becoming just as bloated with type theory, a cumbersome syntax, and will eventually ignite a begrudging dislike by the people that have to find a subset of the language to make sense of just to write simple programs. Everything about this language is overcomplicated by language enthusiasts.

The best thing for Rust over the next few years is for it to fall to the wayside while saner approaches like Hare and safer C syntaxes take center stage.

SmileyKeith 6d
FYI your website's CSS on mobile causes unexpected horizontal scrolling issues
Decabytes 6d
For those who want something less complex than Rust, but with some of the baggage of C++ removed, I would recommend trying D.
infogulch 6d
Every time there's a new post about 'big new features' in current or future Rust releases there's someone shouting in fear of how Rust is getting more and more complex. Rust may be complex, but 99% of newly added features have not made it more complex than the initial release.

Consider a different language with three orthogonal features. You could think of its 'design space' as a cube, where each feature corresponds to a dimension, and where code that uses some features are a point in the space. If the implementors of this hypothetical language didn't know exactly how all three features should interact together but they could figure out how pairs of features would work, you could imagine their initial implementation as the same cube with a chunk missing out of the corner. Later, after users and implementors gather experience about how the language feels, they make a big proposal: The next release will be a full cube instead of a cube with a corner missing! Wow! Now the big question: did this release make the language "more complex"? Well, it is more capable. But it doesn't add any new orthogonal concepts, it just filled out the full space that was implied by the original three. And arguably "cube" is simpler than "cube with a corner missing".

The design of Rust is the cartesian product of about five primary orthogonal features on top of some basic concepts that might be familiar to C programmers. Maybe they are: lifetimes, generics, traits, enums, unsafe. (Argue away if you choose a different five.) When these features were chosen all the way back in 2015 the designers did their best to consider what might happen if you tried to use various combinations of them at once; but crucially, large portions of the corners of this 'space' were left unimplemented simply because it was too hard to do all at once [1]. 65 releases later, Rust has added very few new features -- as in orthogonal concepts -- [2] but has made a lot of progress filling in bits of the design space that was unimplemented but implied by the original five.

And that's literally what this whole article is about: Niko's vision for filling in Rust's implied design space that was left unimplemented for practical reasons, "Making Rust feel simpler by making it more uniform".

[1]: At some point after you've laid the foundation for a big idea it's better to let your idea tell you how it wants to work instead of forcing it, and that requires time and experience with it.

[2]: async, and that's it?