I use it during the work week and it solves a lot of problems and the ecosystem is maturing very quickly. Serde is by far the biggest boon of the language. It is truly state of the art as far as serialisation goes. I also agree with the writer about it not being hard. It's hard in the same way Erlang is hard, it just doesn't operate the way C-like languages conventionally do, though there are some similarities. The borrow checker is pretty easy to wrap your head around once you program more with it.
Overall its a good language. Not perfect, and I'm sure in the future we'll see some better languages, but for what it presents, it's as good of a tool as you'll get in some domains.
The C++ “niche” seems to be no-performance-compromise, low-level-when-needed, high-level-sort-of, native compilation, seamless interop with C, and thus everything else. It is also very verbose, easy to shoot yourself in the foot, and requires a fair amount of proficiency to just use on a daily basis.
Can Rust be the replacement / successor?
This has played out over, and over, and over again. Blockchain, NoSQL, JavaScript, Angular, "web3", Android, iOS, Swift, K8s, and on and on. Legitimate criticism gets drown out by people just fearful that something might take hold and then they're going to have to change how they do things or learn something new.
Eh.
As Carl Sagan apparently said "They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
And even when the technology itself has merit, it's absolutely true that some of the people who have complained about the technologies on your list (or OOP, or Go, or Electron apps, or many, many others) were doing it because this new technology devalued their skills and threatened them. But it's also true that valid criticisms of all of those exist, and all of those have been overhyped and oversold at least sometimes.
"Some people are threatened that NoSQL DBs may devalue their knowledge of SQL" can be true even as "shady startups are lying about the benefits of NoSQL" and "NoSQL DBs are not a panacea and SQL DBs will remain vital and omnipresent" are also true.
They were right to laugh at Columbus. He thought the world was 3x smaller than it had been known to be for more than 1000 years. He was lucky he found the new world instead of starving to death halfway to India.
It is still far from clear whether Rust will achieve the miracle of becoming mainstream. That puts it far ahead of most languages, where it is obvious from the outset that they will fizzle.
- rhetoric taking on levels of hostile zealotry like the linked post
- aggressive insertion of the topic in conversations where it is inappropriate
- inability or resistance to recognizing faults
For another modern example of technology as crusade, see "the blockchain".
It's just a programming language. It doesn't seem like a great sign that this is the type of language emerging as acceptable from a community.
Honestly, this feels like bad faith.
The article explicitly says "this is a rant for catharsis, not a serious argument" and ends with a list of caveats and "okay actually it's more complicated" bits left out of the article.
Even if you take it seriously, you're implying that it's representative of the average Rust advocacy post, but this is easily the strongest piece of rhetoric I've seen in Rust advocacy.
You're implying that "levels of hostile zealotry" are commonplace, but every post I've seen advocating Rust on HN has been polite; for every post saying "this is a problem that Rust could solve" there's at least one answer saying "I like Rust but in this case maybe the costs of refactoring would be too high".
> inability or resistance to recognizing faults
Again, that hasn't been my experience at all.
We are being asked to believe that the mere fact that "I rewrote 'Thing' in Rust" is somehow superior to everything else.
This is true for all modestly popular technologies today. It’s fueled by social media culture. We are living in a world where people get wrapped up in their individual identity because it’s the only way to get any attention. This is a simply how social capital is distributed on the internet.
If you want your programming language, new tech, new video game, or new thing to be popular, then you need to create hype with influencers that wrap their identity up in your new thing and preach it’s endless benefits with cult-like fervor.
In fact, it’s impossible for a new language to survive unless they play this game. In other words, the hype we all hate isn’t rust’s fault, it’s our fault.
We don't need to know that your new shell / grep / text editor is coded in Rust. If it's good, it's good for other reasons, and those reasons are certain to be overwhelmingly more interesting. If it's bad, it's just bad, and that won't save it. We especially don't need to know in the title.
We especially don't need to know your (embarrassingly outdated) opinions about other languages. Those just invite us to point out your mistakes, which will tend to distract readers from what would surely have been deserved admiration for your work.
There is no harm in mentioning implementation languages in the bit at the end where you invite people to send patches, for what ought to be the one obvious reason. [Edit: an announcement about a library clearly needs to mention who can use it.]
Okay, but... there's no harm in mentioning implementation languages in the title either?
If you don't care, that's fine, you can just ignore it.
To me, "built with [new technology]" is a sign that the person who made it had fun, and is proud of their work. It's like an engineer posting "look at our new car prototype, built with [fancy new internal chassis technology]". Maybe it doesn't change anything for the person driving, but it's obviously of interest for the engineer, and potentially for other car-internals-geeks as well.
If you published a thesis, that thesis topic could be interesting, but not that Harvard accepted it, unless they shouldn't have.
As the guy explained, Rust comes with a lot of benefits, and mentioning Rust means getting those benefits.
"I wrote a web browser in Apple ][ Integer BASIC" would mean something.
The natural inference about crowing "in Rust" is that you really did not expect to succeed.
It could have been different if Mozilla hadn't rewritten all of Firefox in Rust while complaining about C++. Firefox dropped from 10% of the web to 3% and into irrelevance during that Rust rewrite and gained nothing. Ironically, Chrome is written in C++ and ate their lunch from Firefox's plate.
Firefox market share has nothing to do with usage of Rust. I very much welcome Mozilla using it in Firefox. They should have gone even further and started using Servo proper. But they didn't have enough resources for that.
HN is a tech community, which means there're many programmers here. Some people may use X and also contribute to X, or at least want to dig into the source code.
For example, since I'm a Rust programmer and not an R programmer, I'm more interested in "A fast query engine written in Rust" than "A fast query engine written in R". There're benefits of using a program written in a language you're familiar with. One of them is when you find a bug you can dig into the source code, post an issue which point out which code might cause the bug, better yet post a PR. Instead of "Please help, X failed to do Y."
That's needlessly inflammatory.
I do. But no one hyped Java as the Silver Bullet or the Holy Grail. There were many known trade offs. ( Performance, GC, Memory usage etc ) And we were allowed to discuss those trade offs.
I never read anyone actually disapprove Rust for its absolute ability to provide memory safety. Nor any inherent distaste for Rust. It may be a difficult language to grasp, but that is about it in terms of negativity.
But when Rust Evangelism StrikeForce demands every single piece of new software to be written in Rust otherwise they are deemed unsafe. One have to question whether any additional Rust hype ( at the time when RESF were still active ) is simply adding fuel to fire, without also adding some balanced view on draw backs.
Technology evangelist, despite my hatred against the term as it should simply be "marketing", is somewhat a necessary evil in order to gain traction and critical mass. But the key word here is critical mass, not world domination, unless you are a marketing and PR genius like Steve Jobs.
Well Sun did actually, apparently Applets were going to change everything.
Thankfully most of the Rust enthusiasts are not like this one at all.
I've yet to find a good toolkit/framework that helps me build web apps. I stick to JavaScript merely because it's a language that allows me to do most of what I want, in a tolerable way, in most situations, on both the client and server.
But, I know the problems with it. And there are a lot.
Is there a toolkit for building web apps that has the ergonomics of something like Svelte? Or, at least is a toolkit that radically simplifies building things in the client with wasm?
Until I find that, I'm just going to stick with JavaScript, only because it's more important for me to ship quick prototypes than build something perfect before I know what that is.
Ironically, there's a sibling comment complaining about how so much of the Rust dev ecosystem is just people making "nothing more than build tools for web development". You can be sure that people are just whining when they can't even get their story straight.
I think this has happened with Java style OOP. It came in existence to fix some things, became "the way to do programming", but honeymoon is over now.
We might see it happening now with gradual typing. Dynamically typed languages are being upgraded with some static typing, and you can see comments popping on HN how this is actually the best way of writing programs.
Rust is in this category and a dose of skepticism is always welcomed.
(Good) static typing is the single most useful thing of any programming language. A large, disorganized project in Java is far better than the same thing in Python or Ruby.
As someone who likes Rust, it takes days or weeks to wrap your head around the borrow checker, and "spaghetti object graph" code patterns in other languages don't transfer well to Rust (Cell<i32> is more awkward to use than C++ int, and RefCell introduces runtime panics). I've had the misfortune of dealing with code written in unsound unsafe Rust which freely converts aliased raw pointers into &mut, even when they likely conflict with other & or &mut. I still don't know how to rewrite it in safe Rust.
Rust is built around making mutable multiple ownership awkward. This is fine (and often results in more understandable code) when you're working in single-ownership code conceived and built around Rust, but when you're using something like gtk-rs (which binds to a C framework built around reference counting and cyclic parent pointers), Rust makes mutating shared state awkward (adding extra state alongside GTK widgets requires RefCell or similar), and reference-counted callbacks awkward (the clone! macro breaks rustfmt).
> Nobody thinks you’re smarter or better because you can remember all the pitfalls.
Oh, I know some people who think that way. Personally I think Rust teaches you the same things as C++ code (reasoning about state, knowing what parts of your code reference an object, knowing when to free an object).
> Soon your solution won’t be faster to market, and will be more expensive to maintain to boot. And someone’s going to eat your lunch while you complain.
There's no Rust GUI framework as comprehensive and mature as Qt. (Then again, there's no C++ GUI framework as clean, usable, and stable as Qt should've been. And people are moving to web UIs.) And some (not all) Rust libraries are amateurish from people who don't know what they're doing; for example, https://lib.rs/crates/samplerate allocates on every conversion (which isn't safe for real-time audio generation) rather than writing into a preallocated &mut buffer. https://docs.rs/hound/latest/hound/ is a WAV file reader which branches on every sample (IDK if it gets optimized out), rather than performing error checking at file open time and bounds checking once per block, which feels bizarre to me.
Re. "An ability to compensate for the shitty state of technology" that exists today isn’t some kind of a competitive “moat”.", writing your own bindings to C code, or performing unsafe C calls directly, instead of using the ergonomic libraries which don't work properly, is compensating for shitty technology.
IMO this article comes pretty close to flamebait and trolling.
What gets my goat is people saying it is a crime against humanity to write code in C++ instead of rust because reasons.
People today might not know that at the time, Microsoft introduced a whole new "app framework" every other year. People stuck coding for Windows were perpetually needing to get "certified" on the new thing. The New Thing was invariably horrendous. (Really, people paid to get certification as qualified to code for Windows! I am not joking.)
Comparing your thing to Java is not a good look.
Lifetimes are hard.