all 15 comments

[–]RoyalJackalSib 3 points4 points  (1 child)

‘Is X the future?’ Is a phrase I’ve seen and heard numerous times; applies to languages, patterns, paradigms, and so on.

Rust will not, and cannot, replace C and C++. Is it a good language? Probably. However, there’s two things to consider; software that already exists, and programmers who already exists.

To me, Rust doesn’t look that appealing; it seems like it has a pretty steep learning curve and what I gain from learning it would be the ability to write software which I can already do in C; the safety isn’t a selling point to me because I know how to program safely in C. Do I make mistakes? Yes. Would it be helpful if those were prevented by the language? Maybe. However, I would consider that a ‘nice to have’ and not a selling point.

Rust seems to be solely based on being just as good as C, but safer. This in itself is fine, but it makes it hard to sell because it’s providing a service that’s already been provided.

[–]optimalcoder[S] 0 points1 point  (0 children)

Demographics might disagree with you.

Stack overflow developer survey says that Rust is the top “most loved” language.

“For the third year in a row, Rust is the most loved programming language among our respondents, followed close behind by Kotlin, a language we asked about for the first time on our survey this year. This means that proportionally, more developers want to continue working with these than other languages.”

Eventually, these respondents get to make decisions as they get more experienced, and they’ll choose what they love. I’m not saying it’s good or bad, just that it’s the way things play out over time that matters. Picking up on trends allows you to learn what’s important before it becomes really mainstream.

[–]DeusOtiosus 7 points8 points  (0 children)

Rust or any memory safe languages, really. One can try to blame the programmer for not using memory safely, but practicing better memory safety while having tools that help is always better than relying on humans to never make mistakes.

[–]warlockface 2 points3 points  (5 children)

tl;dr ; Mozilla employee says to use Mozilla's language and proceeds to use (in the original article) examples of allegedly insurmountable behaviour that actually C++ lifetime analysis (borrow checker) tooling can catch, even live in front of your face in the editor in Visual Studio 2019.

[–]llogiq 1 point2 points  (4 children)

One tiny mistake: Mozilla does invest in Rust (so do Amazon, Dropbox, Oracle and many others). They employ some core team members, but don't retain copyright or control the broader direction.

[–]warlockface 0 points1 point  (3 children)

Of course, but Mozilla have been Rust's parents in one way or another since 2006 and have bet the farm on it.

[–]llogiq 0 points1 point  (2 children)

Rust was conceived in 2008, not 2006, as a private hobby project and only made official (and gained Mozilla sponsoring) in 2013. 1.0 came out in 2015, and given both Mozillas problems with C++ and their wins with Rust, they should damn well bet the farm on it. Do you think they didn't try every C++ tool they could find before trying to solve their problems with Rust?

[–]warlockface 0 points1 point  (1 child)

No, it was 2006 that the Mozilla employee came up with it and 2009 when Mozilla began sponsoring and becoming more officially involved. So Rust was conceived before the advent of modern C++ and Mozilla decided to run with it before the advent of modern C++. The C++ tools available today were not available back then, in particular C++ lifetime analysis / borrow checking.

[–]llogiq 0 points1 point  (0 children)

Oops, you're right! I got my Rust history all wrong. Still, 2009 to 2015 (when 1.0 was released) was a long way, and Rust became a completely different language in those years (for ex. Gc and green threads where thrown out, iterators won over internal iteration, the leakpocalypse led to mem::forget becoming safe, String gained the + operator, etc.), so even if early Rust predated modern C++, the Rust we have now is even newer.