Timestamped: https://youtu.be/6mZRWFQRvmw?t=27012
Some additional context on these two specific claims:
Google found that porting Go to Rust "it takes about the same sized team about the same time to build it, so that's no loss of productivity" and "we do see some benefits from it, we see reduced memory usage [...] and we also see a decreased defect rate over time"
On re-writing C++ into Rust: "in every case, we've seen a decrease by more than 2x in the amount of effort required to both build the services written in Rust, as well as maintain and update those services. [...] C++ is very expensive for us to maintain."
- Graph on time to become sufficiently productive in Rust to comfortably contribute to a codebase: https://youtu.be/6mZRWFQRvmw?t=27149
- Graph on time to become as productive in Rust as in other languages: https://youtu.be/6mZRWFQRvmw?t=27240
- "Yes, it takes some time, but people do feel like they are as productive in Rust as they were in the language that they previously were writing in." https://youtu.be/6mZRWFQRvmw?t=27274
- Graph on the ease of code review in Rust vs other languages: https://youtu.be/6mZRWFQRvmw?t=27304
- Graph on confidence in Rust code correctness: https://youtu.be/6mZRWFQRvmw?t=27361
- Code example vs C++ #1: https://youtu.be/6mZRWFQRvmw?t=27431
- Code example vs C++ #2: https://youtu.be/6mZRWFQRvmw?t=27656
Something that should be mentioned as a disclaimer when quoting his opinion on Rust vs. other languages and that would significantly water down the strength of their claims.
What would the motivation be for someone so senior to lie on stage about this stuff? Just because he likes a programming language?
This is conspiracy style thinking.
Thankfully, if Lars is lying about this, there's tons of Google folks here on Hacker News. I haven't seen anyone yet make an actual claim with any evidence that he's not telling the truth here.
CMake, include conflicts, dependency management, etc. either don't exist or are all much less painful in rust. There is just so much annoying stuff that you do not have to deal with when using it.
There isn't really much revolutionary that rust the language does. Explicitly having to describe the behavior of memory takes getting used to, but lifts some weight of your shoulders. Other than that it has a somewhat better, and less verbose, syntax than C++. But that really is it.
Includes are added automatically when you use code completion. There is also a simple IDE command to add all the include dependencies to your build file.
I don't know how well rust is integrated with Googles internal tooling.
The golang integration is incredible, though. You don't need to touch includes or build dependencies at all. They are fully automated.
No, it isn't. Google even has their own build system, because obviously CMake is so bad, but it it is made for insanely large systems not ease of entry for medium/small projects.
C++ slowly is adopting the language features that allow for such integrated tooling, but it isn't there yet. But right now the tooling can't exists simply because of what C++ is. The problems you can't easily solve in C++ are things like "how do I integrate this already existing library into our build chain", that is a legitimately hard question and millions of lines of code have been written trying to solve that problem.
There is no equivalent to cargo for C++, there is build2, there is conan there is vspkg and the VS build system. ALL of them suck and have their own gigantic problems which will raise their head and suddenly you are struggling with include and build problems.
Google hasn't fixed C++, nobody has.
Have no idea what “include conflicts” are supposed to be. The compiler receives a series of paths and searches for files by name.
>A platform like Android would have an SDK with all dependencies pre-installed, anything else would be nuts.
Android is usually Java, but you still have to manage dependencies yourself. There is no SDK which includes "all" dependencies, that would be absurd. You are going to create your own dependencies.
For CMake, it is so bad that there are many high effort attempts to replace it, by Google, Microsoft and some others, just to not have to deal with it.
Granted, Rust projects I worked didn't have as much scope creep as C++ projects, but I feel like that's in part due to Rust's ecosystem having better glue (cargo) than C++ alternatives
From his keynote presentation the RustNation UK conference.
After you've profiled your working code, you can go back and optimize with less copying, more borrowing, and other optimizations where it matters.
Go has the same issue. After it's working, you go back to profile, and those optimization steps can often take longer than original development. (Which is why you profile before optimizing.)
With C++ you must add on time to catch all the memory access bugs and fix them, which is time you don't have to take in Rust and Go due to the borrow checker and garbage collector respectively.
In Go you have to find all the spots where you didn't check the error return code or other unhandled branches, hopefully before deploying to prod. This is time you don't have to take in Rust since it catches these errors during compile.
The advantage of Go is that the typical path is easier, the learning curve is much shallower, and its orders of magnitude faster to compile leading to faster dev feedback loops. On the Rust side, you've got a longer learning curve, and you really have to actively resist the urge to prematurely optimize.
Productivity in Rust is difficult to talk about, because of differences in opinion and what I like to call “the TCO problem.”
Because Rust is hard to learn, a lot of folks assume it’s that hard all the time. Which means they assume things take just as long for a new Rustacean as they do an experienced one. This is generally not the case. Once things click and you’re over that hump, it feels like programming in any other language. If there are similar libraries available and I don’t need to create the world from scratch, I am just as productive in Rust as in other languages that also have those libraries, generally.
But that kinda leads into the other thing I alluded to; a lot of people think of “productivity” as “whatever lets me see something quickly.” But this doesn’t capture real prodctivity, in my mind, which includes the total development time, aka, how many bugs do I have to deal with later. Rust moves a lot (but not all, of course!) of this up front. Which can feel like it slows you down (but again, with experience, I find this is actually kinda minimal), but then you save time on the back end by needing to debug less. This means that robust features end up being developed more quickly than in some other “productive” languages I’ve used in the past.
TL;DR things aren’t simple, and “fast to get going” doesn’t inherently mean “productive.”
As an answer, Lars specifies that these are regular engineers who were asked to learn Rust, and not early adopters who like shiny things.