Hacker News new | ask | show | jobs
by falcolas 3459 days ago
The best defense is a good offense. What is scaring all of the Rust developers and users so badly that they feel the need to go on such an offensive hype campaign?

It's worse than the phase Java went through when it hit its peak.

I'll be honest. Until we start seeing some more balanced (frankly, I'd settle for nuanced) discussion about the compromises made to get Rust's strengths, I'm staying the hell away from it.

6 comments

>It's worse than the phase Java went through when it hit its peak.

As a person who lived through the 1990s Java hype and had a bookshelf full of the official Java books (Addison-Wesley white books)[1], the Rust evangelism is nowhere near that level.

To refresh the memory, 1990s Java evangelists predicted:

1) C/C++ would become obsolete because in the age of abundant desktop resources (cpu power and more RAM), the GC would take care of all that

2) Java's "write-once-run-anywhere" JVM would render the Windows operating system obsolete and weaken the evil Microsoft

3) Java applets so you could create rich dynamic websites in the browser

As we now know, none of that actually happened. Java is still a success but it couldn't match the breathless press it initially received.

Yes, this particular Rust blog promising "salvation" seems to defy Fred Brook's more conservative "no silver bullet".[2] But relatively speaking, Rust's enthusiastic community is fairly tame.

[1] http://imgur.com/a/8gLe4

[2] https://en.wikipedia.org/wiki/No_Silver_Bullet

Many of those failures were more political than technical.

For example, the internal wars between Windows and DevTools divisions at MSFT, were the biggest reason for Longhorn's failure.

MSR with Midori has proven the viability of using C# for systems programming, when no politics are in play and everyone is focused on technical improvements.

Has Longhorn failure been documented publicly ? I'd love to read about it in details.
Yes, kind of.

This is my personal view of the matter, based on MS blogs, talks, papers and how their technology has been presented to those more MS savy.

https://news.ycombinator.com/item?id=11828585

If you follow the OP of the comment there is another view being presented.

There are lots of conspiracy theories about what went wrong, regardless how much truth each one has, the real matter is that politics played a bigger role than technical issues.

Java/Sun really could've been a serious threat to Microsoft. Microsoft knew this, which is why they rushed to create a competitor (.NET).
They were actually doing it with COM, just decided to go with a VM instead because of that.

Now we have UWP as that idea was brought back to life.

What scares Rust developers and users so badly is the incredible amount of wildly unsafe software that already exists, and all the new wildly unsafe software being written.

> Until we start seeing some more balanced (frankly, I'd settle for nuanced) discussion about the compromises made to get Rust's strengths, I'm staying the hell away from it.

If all you see about Rust is what hits Hacker News, you're probably not going to see much of that. The narrative about Rust's safety and the terrible state of software engineering today and dangers of all of the existing C and C++ code is a strong one that resonates with a lot of people, and so posts about that are likely to be voted up on HN. Posts about how Rust isn't a perfect language and has some flaws, well, maybe not so interesting, because every language has flaws, so there's nothing all that noteworthy there.

Also, FWIW, the post you're commenting on is written by someone who believes what they're saying in the post so strongly that they're writing an entire unix-like OS, including kernel and applications, in Rust. So it's no surprise that they're talking about what excites them about Rust and why they're using it to write a whole OS, rather than any flaws it might have.

Not sure why marketing Rust implies that the community is trying to defend it. Honestly, I enjoy sharing with my experience with Rust because I personally enjoy writing in code with Rust and want to share that with others! Nobody is saying Rust is perfect or doesn't have tradeoffs.
> Nobody is saying Rust is perfect

Err, the title of this article is "Rust is Software's Salvation". The previous one was "Rust is mostly safety". No discussion of trade offs, no negatives to be found. From the original article: "[Rust is] Technology from the past come to save the future from itself"

> Not sure why marketing Rust implies that the community is trying to defend it

The original article was a call for marketing material, because they don't feel enough people are using it. Those people are, to paraphrase the sentiment from the comments in the first article, wrong for thinking they write safe C or C++ code.

Hang on.

The original article that kicked off the 'Rust is mostly safety' article was a call for a change in the marketing material[1], away from the 'Rust is safe' narrative. It's not an attractive narrative (IMO) and the point that Klabnik was making was that Rust is more than 'just' safety.

'Rust is mostly Safety' was written in a sense disagreeing (depends on your interpretation) with Klabnik's article that Rust is much more than safety. Now, yes, these posts (namely the 'Rust is more than safety' and 'Rust is mostly safety' are not discussing the negatives of rust, absolutely, but it's not the scope of the posts to do so, it's not what that particular discussion is about and they should be exempted from this broad brush.

You've taken a quote from the Klabnik post, which is itself quoted from an initial release announcement, which is basically guaranteed to be a spot of marketing. As always, there is a time and a place for the discussion of trade offs and negatives.

A release announcement is not the place for this.

Nor is a discussion of changing the tone of the marketing of the language.

Now, finally turning my attention to the article in the post...well, that strikes me as a place to discuss some negatives. I am not super comfortable with basically listing all the cons of C and well, not even discussing the pros of Rust but presenting it as a panacea.

I think it doesn't quite hit the point of Klabnik's article which to me was more about stopping marketing based on what Rust stops you from doing and marketing Rust more on what it lets you do.

[1] http://words.steveklabnik.com/rust-is-more-than-safety

> The original article was a call for marketing material, because they don't feel enough people are using it.

This is absolutely not true. I would love for Rust to have more users, but that's because I love Rust, and want to share that with people. But really, just like we try to make software better, I'm interested in how to make our pitch better.

You would think Hacker News, of all places, would understand that.

And this is getting nauseating even to these wanting to give it a try. I'm in the step of walking away and forget about it until the dirt settles down (and it becomes at least as fast as C/C++ or... even Go)
In general, if Rust is significantly slower than equivalent C or C++, that's a bug. We track them. Please file them.

Rust should be roughly the same, speed-wise.

I was competing against some C and C++ software developers in Advent of Code with efficient solutions, and my Rust solutions came out faster each time. Might want to check your facts.
That doesnt mean anything. Try a little real software for instance.
Like ripgrep?
>"Until we start seeing some more balanced (frankly, I'd settle for nuanced) discussion about the compromises made to get Rust's strengths, I'm staying the hell away from it."

Look into the issues surrounding the borrow checker, that's one of Rust's main pain points. Long compilation times are another common issue.

To Rust fans, I realise both of those issues will be addressed to some degree as MIR matures, but I'm looking for flaws as things stand now.

Another couple of flaws that could have a big impact on Rust.

- It will be super hard to hire for Rust for a long time. It would be a very bold move to write your app in Rust if you plan to grow your tech team anytime soon.

- I havn't tried learning Rust myself, but I have read that little that it can be a little tricky to start thinking the rust way (borrowing?) Plus the language "looks" hardcore. I wonder if that will put off new devs.

There have comments on HN to the effect that, paradoxically, it's easy to find Haskell developers to hire, because there are so many jobs that require working with more mainstream languages. I would hope the same principle applies to Rust.
You might even hire some of us Haskell programmers.
> super hard to hire for Rust for a long time

Good programmers aren't strongly bound to language. Hire any systems programmer and have that person learn Rust.

Very true, also it's not really a weakness for Rust, but any new language / tools.
Could you please tell more about borrow checker issues?
I assume they're talking about the fact that basically everyone that learns Rust goes through a period of "fighting the borrow checker". Part of the way that rust ensures memory safety is by preventing you from doing things that it can't prove are safe to do. For people coming from languages like C or C++ they've been able to get away with doing things that are probably unsafe but that work either through luck or very careful planning. But since the borrow checker can't prove that some of these tricks are safe it will just say "no" and fail to compile.

Within a couple weeks you will get the hang of what the borrow checker can actually handle and you'll mostly not have problems except when you are actually making a genuine mistake.

Honestly, I found dealing with generics worse than the borrow checker. Since the compiler wants everything to be sized, code that I think should work (i.e. using generics and traits) will sometimes just not compile. In fact - I'm dead in the water facing an issue like that right now. That is, by far, the most frustrating thing in using Rust.
Can you describe the issue? Perhaps someone can help.

I don't know if it helps you or not, but you can specify that a type parameter need not be sized with the ?Sized bound. e.g., The `Path::new` constructor is defined as `fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &Path`. This means `S` can, for example, be `str`, which is an unsized type.

Thanks guys - much appreciated. I'm on my mobile in another country, so, can't post a link right now - but I will later tonight when I've WiFi.

BTW - this reaction is why I continue to work with Rust; the community is awesome!

(Dealing with trait objects and generics...less so)

Have you asked for help on one of the various forums? If something is leaving you dead in the water, I'd like to help you fix that.
Just ask for help in IRC or your local Rust community and you'll get help. If you want - post here link to gist.github and I'll try to help.
Quote: "Rust's borrow checker is a wonderful thing that forces you into designing code to be more robust. But as it is so unlike anything you're used to, it takes time to develop a certain knack to work with it efficiently."

I don't think it's description of an issue.

>"I don't think it's description of an issue."

It is if it drives potential community members away.

No one's being driven away. Only people who had no intention on trying Rust are complaining about it.
How about the fact that the vast bulk of machine-level software is written in C and therefore, by definition, unsafe? That scary enough for ya?
nothing is scaring me as a programmer who use Rust, but I wish to see in such debates more people who at least tried to use Rust more than 2 months, before arguing :) And I just hope this "week of Rust" on HN will attract more people to try Rust. We have cookies and community is very friendly - welcome!