Hacker News new | ask | show | jobs
by papaver-somnamb 957 days ago
What I find most impressive about Rust is the marketing.

It's not the language itself. It's not the safety and other attributes. And it certainly can't be the adoption (currently low % according to StackOverflow [0]).

It's how hyped Rust is. It's how effusive every blurb and sound bite seems to be. Glowing articles frequently make the front page of HN. Famous for penetration into Linux kernel development. What is this mechanism? Who is behind it? Is this veritable storm of hitting me on the head with Rust-this-Rust-that coordinated behind the scenes by some powerful entity? A hyperactive grassroots cheerleader squad? Does it infect C/C++ programmers who've dared to sample it once, turning them into noisy advocates, a la addictive drugs or parasitic fungi? Is Rust merely the It-Thing at the moment that people are mimetically/socially driven to latch onto?

We didn't see this with Lua, Ruby (that was mainly RoR anyways), Python, Swift, C#, certainly not newer-spec C and C++, or any of the others, even Java back in the day.

I don't know Rust, maybe it's deserving of the adulation. But I gotta say, the Rust marketing machine is one of the most superlative campaigns in IT I've ever seen.

[0] https://survey.stackoverflow.co/2022#most-popular-technologi...

Footnote: Some folk seem to be taking offense at my question where none is offered. I'm not for or against Rust, merely ambivalent & curious. Seen many of these waves come through, Rust is definitely the current wave, and the biggest so far! That is something I wish to learn from.

15 comments

It's simple - the praise is predicated not upon Rust being good, but how comparatively shit everything else in the same category is: C, C++, higher level languages for system programming (Go is extremely inadequate, and slow).

Rust gets a lot, a lot of small things right. The things you usually use as an excuse as to why one language or another is better - I found Rust does much more of them in a good way. In most other languages you can have let's say good package management but not fast iterator expressions, or you have compile-time iterator expressions but they are ass to write and package management does not exist, or you have both but all other features are missing, and etc.

Arguably, because Rust is also verbose and sometimes a bit ceremony-heavy, it's not a perfect language, which is why I use C# daily (which is similar and familiar enough with the tooling, package management and critical features like generics and async). But when I need lean and mean applications, there is simply no reason to pick anything but Rust except maybe out of curiosity.

Thanks neonsunset -- so there is this relativistic argument to be made in favor of Rust.

Previously, I'd been involved in writing up samples of a CLI tool in each of Golang, Ruby, Haskell, C++, Python, Java, Clojure. From there we would select one language ecosystem to marry ourselves to and move forward. Every single one left us wanting in terms of either team capability/emotional levels, language expressiveness, distribution, speed, tooling, package management, etc. And I learned here that Rust seems to have each of these down pat to satisfactory degrees.

Next time I'm faced with birthing yet another CLI tool, I thinks I'm gonna try Rust first.

With rust I can sleep at night. It's sooooo much easier to trust a compiler that is THAT pedantic and makes it its business to not let you do stupid things than something that can't even show if you will hit a nullptr.
I feel like shitting on golang is uncalled for if the systems you write can be done in C#.

I often see comments like this on hn, but In my experience golang works great and I'm writing real time systems with it.

> We didn't see this with Lua, Ruby (that was mainly RoR anyways), Python, Swift, C#, certainly not newer-spec C and C++, or any of the others, even Java back in the day.

I think this is an error of perspective. The hype for Python and Ruby in the mid-2000s was off the charts. And the corporate marketing blitz for Java in the 90s was so beyond extreme that it will never be replicated in the space of programming languages.

Rust has zero marketing budget. The vocal adulation is a result of a confluence of coincidental factors that will never be replicated: an open-source, volunteer-run project from perhaps the only company with the proper combination of funding, technical chops, and open-source cachet to pull it off; an industry landscape that has so long rejected some of the best ideas from academic languages (e.g. tagged unions and pattern matching) that any language who can successfully express them to a non-academic audience will be seen as visionary; a specific niche (safe systems programming) whose exemplar never took off in the realm of FOSS, and who has failed to appeal to most segments of industry for whatever reason, with a ripe potential audience eager for a modern champion; slow-moving competitors in the systems space who had become complacent from lack of competition, and who are prevented from effectively competing at the safety niche without breaking backwards compatibility; a relatively friendly production-ready compiler backend in LLVM that suddenly makes competing in the high-performance cross-platform systems space at all feasible; an audience of newly-minted web devs looking to dip their toes into the systems space without needing to offer the traditional pound of flesh; a focus on standardized tooling that makes onboarding easy and going back to other languages painful; and a totally fortuitous, somewhat accidental, fairly brilliant realization that safe systems programming could be possible in the first place, thanks to a novel combination of affine types and region-based memory management, that worked so well that it took even the creators by surprise. Rust is lightning in a bottle.

That wasn't just corporate marketing; Java was the first memory safe language to be widely used in enterprise code, and it led to a lot of C/C++ code being rewritten to address the issue of memory safety bugs. The same may happen with Rust, or perhaps C++ will add facilities for a memory safe subset of the language.
I want to divorce the marketing from the implementation for a second here; Java was widely used in the enterprise as a C++ replacement because of the marketing blitz, not really because of its technical prowess (with the benefit of hindsight, it's safe to say that Java's marketing vastly overpromised what Java could actually deliver for the first decade or so of the language's life). Note that PHP was the beneficiary of a similar (though smaller) enterprise marketing blitz, and PHP took far longer to get its act together than Java did; these companies were adopting based on what they read in magazines and saw on TV (yes, there were TV commercials for Java!).
Java enterprise tooling is based on Smalltalk for a reason....

Likewise the famous Gang of Four book, target at the enterprise space, also uses Smalltalk alongside C++, for the same reason.

Also Visual Age for Smalltalk was the ".NET" of OS/2.

beautiful summary
> Does it infect C/C++ programmers who've dared to sample it once

Yes, that is a big part of it.

From my very subjective impression, having attended many Rust meetups with a constant influx of newcomers, I would say the two biggest groups that are really longing for Rust are:

- C (and sometimes C++) programmers that are looking for a breath of fresh air with modern tooling (e.g. package management) that isn't the result of decades of patchwork upon patchwork

- People that would like to work "close to the metal", but in the past were too tormeted by C/C++/Go segfaults(/other memory issues) to approach the subject. (That's also the group that I fall in)

> We didn't see this with Lua, Ruby (that was mainly RoR anyways), Python, Swift, C#, certainly not newer-spec C and C++, or any of the others, even Java back in the day.

I'm pretty sure we saw a similar hype with Ruby. If you go back ~10 years in the HN archives, you will see about as many "... in Ruby" posts as you see today with Rust. All the other languages listed are too old (I would guess "too old" means predating widespread social media), or have something obvious that alienates a big chunk of developers (e.g. Swift and .NET languages being essentially single-OS languages).

> A hyperactive grassroots cheerleader squad?

If anything the opposite. In the early days of Rust there existed the self-aware inside joke of the "Rust Evangelism Strike Force". Once people actually tried to meme to much with that (e.g. brigading subreddits), that was strongly rejected from inside the "community".

Thanks hobofan, this is the kind of insight I am looking for. Your input hit the spot!
The answer is is the survey you linked : https://survey.stackoverflow.co/2022#technology-most-loved-d...

It's the most loved language, by a wide margin, and has been for several years.

PS: and to be honest, I love programming in Rust. So I will defend it tooth and nail even if I can't use it in my day-to-day work at the office.

Thanks for writing the comment I was going to.

I'll echo your point about loving programming in Rust. I've programmed and continue to program in other languages (Java, PHP, Go), but nothing gives me the same joy as programming in Rust. I know it'll run the first time and likely work correctly as well. And what's more, it'll be faster than any code I could have written in another language.

Not everyone will feel this way, certainly. They, like GP, might come to this bizarre conclusion that noone could like Rust this much, and therefore there is a shadowy cabal promoting Rust for unknown reasons. I don't think there's much we can say to convince them otherwise.

But one thing I do when I see folks complaining that they've never seen such promotion on HN ever. I click on their profile to check how old their account is. Invariably it's 2016 or later. Which means they never saw the cycles of Ruby, JS and Go promotion. This will come and go. In a few years we'll be complaining about, I don't know, the relentless promotion of Mojo.

| I click on their profile to check how old their account is. Invariably it's 2016 or later. Which means they never saw the cycles of Ruby, JS and Go promotion.

Provided that was the account they've been using since they started on HN ;)

Not that I really paid attention during those other waves but weren't they justified? Sure in today's time you might have a bunch of alternatives you prefer to do but it wouldn't surprise me if somebody made a new language 20 years in the future based on Rust but without XYZ mistakes.

i.e. JS allow webpages to do stuff without needing to reload the page every time. It basically lets you make mods for the browser! Like JQuery was really useful at the time and not now because everybody browser implemented their methods.

i.e. Ruby (Rails), IIUC it was super easy to do CRUD sites without spending as much time on the tedious plumbing/infrastructure stuff.

And their memory isn't failing them :)
I do use rust professionally, and I also love it! I’m 2.5 years in, and I would be sad if I had to switch jobs and mostly use a different language.

Nothing is perfect, but Rust is definitely more pleasant to work with (for me at least) than C++, JS, TS, Python, Go, or anything else I’m likely to get a job using. I do think it’d be fun to work in a Clojure or Elixir shop, but I’m still hobby-level on those, so probably it’s just the perception of green grass.

> [Rust is] the most loved language, by a wide margin, and has been for several years

"...among users that respond to StackOverflow surveys."

People really want Rust to be popular because people really like writing Rust. There is no campaign, no background force. There's some intelligence to it - people know to post something like this on a Friday morning, and not a Thursday night, but that's it.

You're just seeing a project with genuine excitement behind it.

> Does it infect C/C++ programmers who've dared to sample it once, turning them into noisy advocates, a la addictive drugs or parasitic fungi?

It definitely did that to me. I remember trying out Rust and was amazed at how much abuse I'd put up with from C++ for all these years. Now I just want to try out Rust in a large enterprise project to see if it will just be replaced with a different kind of abuse...

I guess I'm not sure what the "marketing machine" is here. The Rust team published an article _on their own blog_ and someone posted here on HN, then people discuss it if they're interested.

I mean every language has some amount of "marketing" - people speaking at conferences, etc., but it's not like you're getting product advertising here in the form of commercials on TV or advertisements on the side of web pages. I think what you're seeing here is genuine interest.

Unless you're implying that HN itself has some sort of algorithm bias to push Rust posts to the top?

It seems you are not the type to run out and adopt the shiny new thing on day one. I commend you for this. You haven't bought a hydrogen car yet? That's ok.

You haven't tried a cordless drill? Well, alright. You don't have to. You can survive without one. But rather than ask others what the big deal is at this point, why don't you just try one the next time you have to screw a picture to the wall. Borrow one if you don't want to commit to owning. Figure out for yourself whether having a charger and having to swap batteries is worth it. Maybe you'll decide it isn't. Maybe you'll be disgusted that you have to buy a new drill every 10 years while your 40 year old corded model still works fine.

But don't be too shocked if everybody else makes the leap. Sometimes the shiny new fad really is the future.

And you can still keep your corded drill around for those times when it really is the better tool for the job.

I think a lot of it is that there was pent-up demand for a language like Rust.

Rust feels like the language that in 1990 I was promised I would have in the year 2000.

One of my more cherished scraps of notes dates from the 90s, when I tried (and miserably failed) to invent something much like Rust.

I've been waiting a long time for a language that's fast, safe and allows me to dabble in functional-style programming.

During those days I was quite happy with Turbo Pascal and Turbo Vision,...

At least Pascal syntax is fashionable again, across all newer languages.

People don't know what they want well enough to specify it. However, if you built something they like, they will recognise that even if they struggle to articulate why it's good.

I don't think that's part of marketing, unless you'd see for example a furniture company deciding to use a higher quality wood for their new tables as "marketing" because the tables will be nicer and customers will like that.

new systems languages are much more rare than new scripting languages, and the focus on usability of the surrounding toolchain makes it a particular darling for anyone who touches it.

The other arguments (memory safety et al.) are sort of on the side imo; I really enjoy writing, reading and running rust because the developer experience is just so solid.

When I say "developer experience" I mean the crates system and cargo, not necessarily the language itself (which I find a bit ugly to be frank).

> new systems languages are much more rare than new scripting languages

No, and have never been. C and later C++ are (were) just _that_ prominent, that most people never heard of the alternatives (except for Pascal and/or ADA, Objective-C and maybe D).

Nowadays there is Zig (most people have heard about that, I guess), Carbon, Cppfront, Odin, Jai, Vale, Austral (and some more I've forgotten about).

For your 7 systems languages I can name 150 new scripting languages.

Objective-C requires a runtime, it's not a systems language because of that, I think Pascal is also requiring a runtime but that's not important right now.

D is a great example, I tried very hard to make D work and it just didn't.

I was even trying to use D-Langs own mailing list frontend (written in D) and it was nearly impossible for an outsider.

Contrast that to Rust, and aside from picking the right toolchain (nightly or stable); "cargo build" after following the quickstart on the internet will build practically all rust projects. With the minor caveat that if there are any bindings to system libraries then you need those too (libssl-dev for debian being a common requirement for openssl-sys for example).

> For your 7 systems languages I can name 150 new scripting languages.

Please don't take that as an offence, but please name at least 5 or 10 (which aren't "just" compiled to JS, I've actually forgotten about them ;). I've only heard about Elixir and Verse (yes, because of SPJ) which actually are somewhat used "in the wild".

But my point is exactly that Rust _is_ really an outsider by being significantly better than the (many or not so many does not matter that much ;) alternatives to C++.

I can't name 150, but since C++ was released in the 80's there has been: JavaScript itself, Java, C#, PHP, Python, Ruby, Go, Swift, Kotlin, and many other very popular languages in the "higher level programming languages" category. And only really Rust has reached a comparable level of popularity in the "systems level language" category (with perhaps D and Zig in the next "tier").
Category systems programming.

Cedar, Ada, Modula-2, Modula-2+, Modula-3, Oberon, Oberon-2, Component Pascal, Object Pascal, Turbo Pascal, Delphi, Active Oberon, OCaml, Objective-C, Oberon-07

I mean, from the top of my head; Crystal, V-Lang, Hack (based on PHP), Futhark, Raku & Mojo
Crystal, V-Lang, Futhark, Mojo are also targeted to the C and C++ space, and aren't scripting languages.
For a very long time there has been no viable alternative in the strictly-no-GC space. Every new systems-adjacent language concluded "GC is fine for 99% of programs" (which is true), and then excluded themselves from the no-GC niche. Rust almost did the same thing — early design assumed per-thread GC.
People make new interpreters/ managed languages all the time, it's not even close.
Yes (even I did and do), but I thought we were talking about languages that are actually used by more than 10 users.
Lots of languages, like Python, started off as random toy projects.
I think a lot of people are stuck with C++ due to the fact that there are a lot of legacy C++ codebases (many decades old), moreso than legacy Python or Javascript codebases.

Rust does a ton of things better than C++ as other people here are mentioning. For example, at my 20-man C++ shop, we have around 2 people's worth of full-time cmake work, that is, just maintaining the build system. This work would largely go away if it was a Rust codebase.

Only if it would be a pure Rust codebase.
Given the lack of knowledge and openness to "it's deserving of the adulation", what's wrong with it being the answer?
Something I think helps it, is it has the allure of re-writing a project from scratch, thinking about your mistakes ahead of time, and lacking most of the technical debt.

This isn't to say it lacks any technical debt, but that the language feels very transparent and thoughtful. Contrary to say, a language built by a big company(.NET, Go) or built by strong opinions(Python). Rust in comparison feels modest in its delivery but ambitious in its design.

Its terrible reasoning for picking a language to write a project in, but Rust feels trustworthy I think.

> Is Rust merely the It-Thing at the moment that people are mimetically/socially driven to latch onto?

I think so. Sociological phenomenon initially bootstrapped by a small number of "influencers". Same with golang 10 years back. Same with frameworks (angular, react). Do you remember the hype around "XML revolution" around 2000? It was arguably bigger than rust's.

Somebody has to write a book on the history of software cults - it will make a fun read. :-)