Live data from Hacker News

Why I love Rust

speakerdeck.com

121–130 of 159 posts

Re: Why I love Rust

#121

Earlier quoted context omitted.

"Also the last time I saw a video about a low level language discussion, only Rust had a dev there nobody really knows. C++, D and Go had prominent people speaking for them." That has nothing to do with anything. "Rust is trying something new and Go tries to only use the stuff that worked in the past. It's no surprise that people favor Go instead of Rust." That's a good point. Anyone doing something critical wants lo…

> Go's methods were proven in Pascal, Oberon, etc. So, Go is less risk. Totally disagree. Rust's ideas are tweaks of decades-old research. These tweaks are what make it interesting and constitute research in their own right, but Go did that too with their tweaks to CSP and interfaces.

You disagree that the basic functionality of Go, including type and memory safety, have been proven by prior language and production deployments? That's my basic premise. If Pascal/Oberon-like languages and GC's are proven, then one that's very similar to them will likely maintain those properties and deliver the same results. That's supported by the number of amateurs that ported and re-implemented Oberon OS & compilers successfully in 6 months to 2 years at ETH.

Whereas Rust uses a combination of proven primitives and exotic techniques to achieve its goals. The exotic stuff, integration strategy, and implementation are new territory that exposes a level of risk a tried-and-true method (eg knock-off Oberon) doesn't have. It's new and unfamiliar territory to programmers at large even if some methods were seen in academia (eg Cyclone). It must be shown to be effective in terms of daily usage, standard libraries, and tooling because it's such new and unfamiliar territory.

When it is, as I have confidence in the team(s), it will then have a different argument where it eliminates way more risks than it introduces. Already has it at application level if compiler is robust. Overall thing needs more deployment, though, so people can see if it lives up to it, how much, and in what scenarios. That's the risk perception I'm talking about. Right now, it's a big unknown to many outsiders compared to traditional languages and platforms.

Re: Why I love Rust

#122

Earlier quoted context omitted.

> I think it's a risky move. > It's just... wow, that's pretty mission critical for what I gather is still a beta-phase tool. I think this is very '90s thinking. Extreme "if it's not C++, you can't deploy it!" conservatism about programming languages hasn't been true for well over a decade. Paul Graham has written some nice essays about this very phenomenon. Also, Rust is not "a beta-phase tool". New languages are mu…

You've been in discussions on this forum where I slam both C and C++. I'm clearly against it unless I absolutely have to use it due to its issues. That's why your strawman is more amusing than most. My actual argument was that new tools are usually unstable in terms of features, implementation bugs, and (with compilers) performance. So, default recommendation for mission-critical apps are mature tools whose strengths…

Yes, 1.0 is stable and the language will not change in backwards incompatible ways. It's been that way for months (google "rust stability deliverable").

"All bugs fixed" rules out every language in existence except CompCert, so I don't think that's a very interesting metric.

Re: Why I love Rust

#123
post #49

Earlier quoted context omitted.

Not really. From a carreer perspective you are 100% certain that there will be a lot of demand for C++ in 5 years (since the whole IT infrastructure is written either in C or in C++), whereas for Rust you are taking a huge bet.

Maybe my perspective is biased because I work in a very conservative industry, but a large part of C++ jobs in the next 5 years will likely be about maintenance/evolution of massive legacy C++98/C++03 applications. And you won't likely use a lot of C++14 or C++17, while on the other hand the rare Rust project might be a bit more exciting. But if you're primary motivation to learn a new language is to get a job, Cpp i…

> a large part of C++ jobs in the next 5 years will likely be about maintenance/evolution of massive legacy C++98/C++03 applications

This is exactly right, and it's been true for many years now. That your old codebase is written in C++ is a totally legitimate reason to use C++.

Re: Why I love Rust

#124

Earlier quoted context omitted.

> (rather than higher level, which these languages both are) Rust should be (and is, modulo wrinkles, I mean there's no fundamental reason) as low level as it gets. What makes Rust too high-level for gamedev?

It's probably not too high level for game dev. However, modern AAA game dev is largely about customising and upgrading large existing game engines, which are all C++ based. Rust could be used for them, but isn't, and the extra features Rust brings are not compelling enough to rewrite huge amounts of working code and suffer (re)training costs. This is a hole many new languages find themselves in. JetBrains have come u…

Yes, this is a good point about AAA.

The issue with interop is on the C++ side, unfortunately, not our side. Until C++ has a well-defined ABI, it's not really possible.

Re: Why I love Rust

#125

Earlier quoted context omitted.

I'm always interested in trying to figure out how to explain these things better, if you ever want to vent some frustrations at someone :) > bury Rust's borrow checker for those parts of an application The problem with that is, if you did, you're back to > I spent a huge amount of my time inside the debugger trying > to figure out why a pointer wasn't ... pointing. What I can say is that after you get over the hump,…

I swear I've seen more than one person gripe about this. Mostly from a change of thinking but it seems recurring. Might hurt adoption. I'd have expected Rust proponents to have a link on-hand for this to a guide that teaches this stuff in a way to reduce the effect. To be clear, this is not a critique of the Rust team so much as an observation of a larger problem in PL adoption that might be affecting Rust. The trick…

  > I'd have expected Rust proponents to have a link on-hand for this to
  > a guide that teaches this stuff in a way to reduce the effect. 
I mean, yeah, I can link you to several. But reading a bunch of rules isn't the same as programming with them for a long time. Even once you understand the rules, the compiler will still catch you. If humans could reliably program safely without the compiler being involved, well, Rust wouldn't need to exist; C and C++ code would be written in a safe way.

Anyway, like I said, I'm doing my best. More experience reports is the only way that I can do that, basically :)

Re: Why I love Rust

#126

Earlier quoted context omitted.

This is a weird answer to the question, especially since Rust very probably has whatever "modern C++ techniques" you were thinking of.

Rust lacks higher kind types which C++ has had in the form of template templates since 1998. Rust also lacks the equivalent of variadic templates. If you want to see where that is different take a look at generic tuple manipulation in C++11 vs Rust.

And Rust has other features that no shipping version of C++ has, like full-featured pattern matching, lifetimes, and concepts. These are features you will use hugely more often than template templates and variadic generics.

But really, what's the point? The reasons you'd learn a low-level systems language are to learn how to manage memory and resources, to learn how to explicitly lay out data and to understand how to program without a runtime. Both Rust and C++ will teach you these.

Re: Why I love Rust

#127

Earlier quoted context omitted.

The project lead already said on Reddit that if Dropbox loses data, it's now Rust's fault, so... :) The project was a whole team of engineers working for almost a year, with extensive testing. At least, that's what I've heard. So like, I think they did exactly what you said, it's just that it's ready by now.

Oh shit! That's one hell of an endorsement [in the making]. I bet the excitement and suspense are thick in the office, eh? Hope it works out for adoption reasons.

More details: https://www.reddit.com/r/programming/comments/3w8dgn/announc...

Re: Why I love Rust

#128

Earlier quoted context omitted.

It's probably not too high level for game dev. However, modern AAA game dev is largely about customising and upgrading large existing game engines, which are all C++ based. Rust could be used for them, but isn't, and the extra features Rust brings are not compelling enough to rewrite huge amounts of working code and suffer (re)training costs. This is a hole many new languages find themselves in. JetBrains have come u…

Yes, this is a good point about AAA. The issue with interop is on the C++ side, unfortunately, not our side. Until C++ has a well-defined ABI, it's not really possible.

It's not clear to me that it's impossible. The ABI isn't a huge issue; templates are, though. I can see a potential path forward by using clang heavily, but it requires a lot of thought.

Isn't Swift looking heavily into C++ interop? It might make sense to collaborate with them to get it to work in both languages.

Re: Why I love Rust

#129

Earlier quoted context omitted.

It's probably not too high level for game dev. However, modern AAA game dev is largely about customising and upgrading large existing game engines, which are all C++ based. Rust could be used for them, but isn't, and the extra features Rust brings are not compelling enough to rewrite huge amounts of working code and suffer (re)training costs. This is a hole many new languages find themselves in. JetBrains have come u…

Yes, this is a good point about AAA. The issue with interop is on the C++ side, unfortunately, not our side. Until C++ has a well-defined ABI, it's not really possible.

C++ has a well defined ABI on many important platforms.

On GCC/LLVM based platforms it's standardised in specification documents. On Windows, I think the Visual C++ ABI is the de-facto standard.

Regardless, there are only a handful of top C++ compilers. Interop with even one of them would be of tremendous value.

Re: Why I love Rust

#130

Earlier quoted context omitted.

Yes, this is a good point about AAA. The issue with interop is on the C++ side, unfortunately, not our side. Until C++ has a well-defined ABI, it's not really possible.

It's not clear to me that it's impossible. The ABI isn't a huge issue; templates are, though. I can see a potential path forward by using clang heavily, but it requires a lot of thought. Isn't Swift looking heavily into C++ interop? It might make sense to collaborate with them to get it to work in both languages.

Swift is implemented in C++, and uses LLVM stuff that we don't because it's not exposed in the C ABI, last I heard.
Post reply on HN