178 karma · joined December 27, 2016
It is all a matter of mindset, and so if you think it is hard, then it will be hard. However, you must remember that like many things in life, learning is like a Chinese finger trap. The more you struggle and resist, the harder it seems. Rust is a Chinese finger trap. Until you change your point of view and use a different, simpler approach, you will have hard time.
> Memory safety is not a problem in game development, they will just patch the bugs.
You must not have played any Bethesda titles. That said, there is much more to Rust than memory safety. That's just a side effect of the safe parallelism -- it's a minor story.
The website stores all the content in a database, uses handlebar templates to generate HTML pages, stores the generated HTML pages in a concurrent hash map compressed with the native Rust implementation of Zopfli, and only regenerates pages after a set amount of time -- all in pure Rust. I can serve an unrealistic amount of requests per second -- just bottlenecked by a consumer-grade network connection.
Case in point, in the Ion shell that I am working on, I have a shell expansion module within that takes a structure containing closures that are used to grab and expand array variables, string variables, tilde variables, and process expansions.
Because of this, the module can live as an entirely separate piece of software with no dependency on the specifics of Ion, and I can write reduced unit tests that extensively test every component. I could strip it out of Ion and use it with a completely different shell project. That shell would just have to provide the batteries (closures) that define what to do with certain tokens.
The Rust ecosystem is able to make leaps and bounds on a regular basis precisely because we aren't limiting ourselves to ancient versions of the Rust compiler because the system we use isn't technologically savvy enough to keep up with the times. Rust basically follows the Internet age of development, whereas point release distributions are stuck in a metaphorical floppy disk era (and often times still use mailing lists).
Rustup is a major tool for development because it allows us to keep our toolchains updated. It's used for obtaining nightly compilers, stable compilers, official documentation, rust source code for racer autocompletion, and various different types of targets, such as MUSL vs Glibc on Linux, or installing the Windows GNU toolchain on Linux for cross-compiling.
And there's literally zero reason to not follow the latest Rust compiler. Rust follows the semantic versioning rules, which dictates that all of the 1.x.x release are backwards compatible with 1.0.0. Upgrading the compiler will bring no breaking changes, but it will bring improved performance and features.
If you've written software before, you would know that most of your codepaths require prior data to be processed, and thus having multiple cores won't make software any faster than before. Additionally, there is a cost to starting threads, so the benefit of making your software multi-threaded has to outweigh the cost of launching a thread, sending data to that thread, and getting results from that thread.
Pooling and channels are often used to mitigate the initial cost of creating threads, but it still remains that it takes time to send data to a thread and receive data from that thread, and there will always be that one main thread that needs to handle the majority of the logic and keep results in sync.
Basically, it would be easier to see powerful cores sitting adjacent to miniature parallel cores that are able to respond quickly to requests.
Companies are more willing to hire outside labor -- effectively slave labor, because they are able to pay foreign workers much less than domestic citizens. Companies are also more willing to replace human employees with robots, because it's cheaper than paying a human to do the same job. Companies will not help employees transition into new job positions. Fast food restaurants are beginning to replace all their workers with robots. The truck driving industry is about to replace all of it's drivers with robots. Walmart is replacing it's stockers and cashiers with robots. Pizza shops are even going for full autonomy with self-driving pizza trucks that automatically make pizza while delivering it. A huge percent of existing jobs today will soon be taken over by robots. You can definitely ensure that all the jobs that are considered entry level will no longer exist. How then, will the young get their foot in the door and become independent when they have no jobs?
That race to the bottom has merely displaced millions upon millions of people and abolished the middle class, in addition to destabilizing the world economy. Capitalism is entirely incapable of keeping up with the modern world. The only way forward is a basic income.
The only people who have issues are people who've used Rust for less than a week and still do not understand the basic rules of the borrow checker. I've explained it many times to people already. Once you know the rules, it's easy peasy, and you'll never have another complaint from the borrow checker ever again.
The only improvements that I could see for Rust is landing non-lexical borrows, macros 2.0, and faster compile times, albeit compile times are largely fixed now. A 100K combined LoC project can easily compile a release build using 1 core in 3 minutes or less.
> I just don't see Mozilla having enough resources to keep-up the momentum long-term.
Did you forget about Samsung? Mozilla and Samsung aren't the only two companies backing Rust.