Ok, guys. Tell me, why should I learn Rust?

Ok, guys. Tell me, why should I learn Rust?

Bonus: What have you used it for?

It's fast, does multithreading well, it can handle a lot of different use cases relatively easily. For example it can replace systems programming and back end web development without much hassle. It also has some use in embedded development, but has a number of things that hold it back in that niche.
It's major downside is that it's hard to learn since it compresses everything people do wrong in languages as a requirement to even write basic programs in it. It's trait handler is also confusing when it comes to lifetimes until you get used to it.
I have used it for web servers, backend data processing of 30 gigabyte datasets and a few programs on an arm cortex m board.

Interesting, details regarding the web servers and data processing part?

How did you build the web server? How did it perform?

>why should I learn Rust?
to fight the patriarchy

>What have you used it for?
social justice

You can do it by hand if you want to process on a socket level, but really you should be using something like Gotham or Rocket. If your app is mostly doing API calls it should be fine. For something that is more static I don't think it's ready yet.

Data processing was more of a hobby project and I would recommend against for a while. No rust framework is currently good enough if you if you need to do any sort of machine learning. I was just analyzing web server logs to track down a intermittent bug.

Anecdotally I hear a lot of game engine devs are looking into rust but I don't know anything about that world.

amateur gamedev here, here's how I feel about rust:

My game doesn't need to be safe or threaded, nice to have but kinda defeats the purpose of rust.
Piston is a confusing mess and I don't even want to try messing with it.
rust's lua (hlua) and serde are very nice libs. #[derive(Serialize)] for going to json and back is wizardry that I wish C++ had.
Modules are fricking great once you understand them.
High-level graphics bindings are sadly lacking, though using gl-rs with glutin is probably sufficient for most people. rust-sdl2 is pretty good for 2d, albeit over-engineered.
I find the language is missing a lot of ergonomic features. It's very hard to write rust code that compiles the first time, and easy to repeat yourself.
You have to compose all your data structures, which can be a hassle compared to inheritance.

Overall I'd say it's set up for success but lacking the libs to be truly nice for gamedev.

>My game doesn't need to be safe or threaded, nice to have but kinda defeats the purpose of rust.

Wouldn't being threaded be incredibly useful for games which are more demanding when it comes to performance? I mean, if you're an amateur I imagine you're not working on anything high end, but once it reaches beyond the ability of a one or two man team wouldn't that be a highly desirable feature?

I guess the thing with rust is, (unless you use unsafe blocks a lot, which isn't exactly idiomatic), it makes sure that all of your code is threadsafe regardless of whether or not you thread it, or even what parts you thread.
You can get around of a lot of safety things (like checking for pointer aliasing) just by using reference-counted types, but Rc, and Arc is just plain clumsy.

I am a Rust fanboy, but fuck you asshole, I got tired of your spamming. Reported.
EACH FUCKING DAY you create this thread and spam in other ones.

>it's hard to learn since it compresses everything people do wrong in languages as a requirement to even write basic programs
care to explain ?

Well, it has a chance of turning out to be the C++ successor

The borrow checker is like if RAII was mandatory in C++
And it's terribly restrictive

Rust is good if you don't mind being treated like a retard.

First time I've posted this, user. Honest.

This is not the spammer you're looking for.

>guys
Did you just assume my gender?!
Reported to the Rust Police! Enjoy your stay in the gulag

>Sup Forums considers this humor

>treated like a retard
Nah. Rust is less "you're an idiot, so we're going to dumb this down for you," and more "I expect you to be intelligent, and I'm going to hit you with this bag of bricks whenever you act like a dumbass."

You mean Sup Forums

>Wouldn't being threaded be incredibly useful for games which are more demanding when it comes to performance?
Nongamedev here: As far as I get it, Rusts avoids race conditions by avoiding too much aliasing. Since in games everything has to interact with everything this sounds like a hard time.
The only thing I can think of that isn't connected to almost everything else is particle effects and those are moved to the GPU novadays.

Nope, Rust avoids data races at the type system level, a program with data races will not compile.

That's achieved through the Send and Sync marker traits. Of course if you write your own threading abstraction using whatever platform dependant code with unsafe and not implement Send and Sync properly then you're back to step one.

>Wouldn't being threaded be incredibly useful for games which are more demanding when it comes to performance?
Rust won't automatically make your game logic properly utilize all available cores. It simply ensures that there are no data race conditions during compile time, that's about all their "fearless concurrency" slogan stands for.

The syntax is horrifying. Immutability by default does not work for what claims to be a systems programming language. Neither does the borrow checker. Then there are other nuisances, like the :: operator.