Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022

3 years ago by snaggen to c/rust

Wondering about Rust? We're addressing rumors and providing insight gained from years of early adoption of Rust here at Google.

This post will analyze some data covering years of early adoption of Rust at Google. At Google, they have been seeing increased Rust adoption, especially in their consumer applications and platforms. Pulling from the over 1,000 Google developers who have authored and committed Rust code as some part of their work in 2022, they willl address some rumors head-on, both confirming some issues that could be improved and sharing some enlightening discoveries we have made along the way.

flynnguy 7 points 3 years ago

Matches my experience with rust as well. Once I got used to some of the concepts and syntax, everything started to just fall into place.

path: 0 585214, hotness: undefined, score: 7, children: 5
snaggen 3 points 3 years ago

Yes, I started off with a C mindset and had a bit of a struggle the first days until the mental model of ownership and borrowing landed, after that it is mostly learning to use new concepts like pattern matching, the ? operator aso.

path: 0 585214 591797, hotness: undefined, score: 3, children: 2
flynnguy 3 points 3 years ago

I've done some elixir so pattern matching and functional programming was pretty familiar but yeah, borrowing took me actually reading about it rather than going "I can just figure this out" before I was like "Oh, that makes sense."

And yeah, I remember the first time I encountered the ? operator in some example code I was like WTF?!??! How do I search for THAT?

path: 0 585214 591797 600127, hotness: undefined, score: 3, children: 1
snaggen 4 points 3 years ago

Having programmed in C, I got the ownership model quite fast. I just think of it as "is this function going to do an implicit free on return", if not then it should just borrow it. And for C, you already had to think of ownership, just that it was not enforced in any way in the language... if you messed up the ownership to either got a crash or leak.

path: 0 585214 591797 600127 600714, hotness: undefined, score: 4, children: 0
jpfreely 2 points 3 years ago

Same here. It's been 1-2 months and I feel pretty comfortable.

path: 0 585214 589653, hotness: undefined, score: 2, children: 1
philm 1 point 3 years ago

That's great to hear, my experience way back when I have learned Rust was a little bit more rough (though still nice), and I think it took longer for me to get really comfortable (language server (at that time "rls") was far not as good as rust-analyzer is now).

path: 0 585214 589653 673152, hotness: undefined, score: 1, children: 0
grossjonas 4 points 3 years ago

Nice

path: 0 582640, hotness: undefined, score: 4, children: 0
rust
rust

@programming.dev

login for more options
8329
1423
338

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

go to feed...