Algorithms + Data Structures = Programs - Episode 106: Jane Losare-Lusby on Rust!
Episode Date: December 2, 2022In this episode, Conor and Bryce talk to Jane Losare-Lusby about the Rust Programming Language.Link to Episode 106 on WebsiteTwitterADSP: The PodcastConor HoekstraBryce Adelstein LelbachAbout the Gues...t:Jane Losare-Lusby is currently on both the Rust Library Team and the Rust Library API Team. She is also the Error Handling Project Group Lead, the Rust Foundation Project Director of Collaboration, and a Principal Rust Open Source Engineer at Futurewei Technologies.Show NotesDate Recorded: 2022-11-02Date Released: 2022-12-02https://cheats.rs/Rustacean Station: Error Handling in Rust with Jane Losare-LusbyAre We Podcast Yet with Jane Losare-LusbyADSP poll about becoming a Rust podcastConor’s Tweet about /cpp vs /rustADSP Episode 101: C++ Developers Try Rust!C++23 std::views::zipRust std::iter::Iterator::zipRust ClippyRust TraitsC++20 ConceptsEsteban K ber on TwitterRust unsafeRust miriThis Week in RustRust AnalyzerRust std::iter::Iterator::flat_mapRust std::iter::Iterator::enumerateIntro Song InfoMiss You by Sarah Jansen https://soundcloud.com/sarahjansenmusicCreative Commons — Attribution 3.0 Unported — CC BY 3.0Free Download / Stream: http://bit.ly/l-miss-youMusic promoted by Audio Library https://youtu.be/iYYxnasvfx8
Transcript
Discussion (0)
I remember I had, he had instilled in me a respect for ML and something like an interest,
but I had never really gotten into it. I'd never really actually taken the time to learn.
And so I see this, I'm like, oh, that sounds like something really interesting. Like I want to,
I want to learn about this. And so it's like, yeah, let's do Rust.
And very quickly fell in love and started using it for everything I could.
Welcome to ADSP The Podcast, episode 106, recorded on November 2nd, 2022.
My name is Connor, and today with my co-host Bryce, we interview Jane Lazari-Lusby and talk about the Rust programming language.
So I ended up not being late, Connor.
I mean, I could have 100% not been late.
That was late. That was late.
This was five minutes late.
That was late. This is a first. Wait, I'm recording. Is everybody recording?
This is your narrator connor here unfortunately not everyone's mics were recording thanks i'm blaming
bryce because bryce was late bryce threw us off our game but jane's mic we got sorted out
in a few minutes or so so if you're thinking to yourself, how come Jane's not saying anything?
That's because we didn't have her audio recorded.
But hopefully it isn't too confusing.
Because this needs to be on record.
This is the first time, and it's terrible,
the first time we have a Rust individual on,
someone from the Rust community.
I got to turn the AC off or the audio is going to be terrible.
Oh my goodness.
Okay, continue.
I apologize, Jane.
I take this podcast very seriously. I feel less bad about recording a whole set of podcasts without Bryce now because he... Wait, wait, what was that? What was that?
Yes, Bryce. Well, wait, this is going to be a rough takeoff. Have you listened to any of the ADSP episodes?
Okay, so you...
So I could have been 100% on time,
but I knew I needed to stop for ice cream on the way home.
It wasn't even something important.
So I know you've been on Are We Podcast yet,
and you've been on Rustation Station.
Have you been on others outside the Rust community as well?
You've only listened to... You've listened to less than two,
like episodes or you mean podcasts?
It's all right, Connor.
Not everybody listens to podcasts.
I mean, it's just.
It's like you invite,
we invite Jane on this podcast
and the first thing you do, Connor,
is you're like, what?
You don't listen to podcasts?
I understand that some people
don't listen to podcasts,
but I was expecting her to say that,
oh, I've been on 12 podcasts or something,
a bunch of Python ones, a bunch of C++ ones.
And so actually, I've listened to a handful here and there.
I was just shocked to hear that you listen to less than two.
All right, wait.
So I have a bit of a problem.
Can we introduce our guest first?
No, I have a bit of a problem. Can we introduce our guest first? No. I have a bit of a problem.
So dear listener, you just heard me ask, can we introduce our guest first?
And then you heard, and that was all Bryce telling us stuff that's unimportant.
I hope you're going to include the no.
Let's get to formally introducing Jane though.
So Jane, I don't know a percentage of our listeners are Rust developers. I'd probably say,
what do you think, Bryce? 25% maybe have dabbled in a bit of Rust, because I'd say it's like
75% to 90% C++. And so because of that, some of them will have exposure to Rust. But Jane
is a number of things. She's a collaboration
director for the Rust Foundation. We're catching you right at the end of your Rust library and
library API team terms. And previously, you are a Rust developer full-time now, I think,
and previously a C++ developer, which is fantastic for this podcast. And so just to fill you in, how did this all happen?
I guess the last time we recorded, I started talking about how we were going to launch
a poll because I've started working on a little Rust library.
Connor and I are kind of, I don't know, done with C++.
I'm like joking, but...
You can't say that.
You can't say that.
We're definitely not done with C++.
I might be.
Fast forward like a couple months from now.
We put out a poll. We actually don't even know how that's doing last time i checked it was the
poll was to inform jane because our listeners know it was uh what do you prefer to our listeners a
we turn this temporarily into a rust podcast b connor starts a new rust only podcast or c both
and i think it was like 38 a 36 b and C was whatever the remainder of that was.
So we're going to be temporarily for like,
I don't know how many episodes, the next 10, 20,
going to be turning this into a Rust podcast.
And we thought we started like live.
We weren't, I was live coding and I was just,
oh yes, we have to update.
The first thing we tried to do
was get the first element from a vector. The first thing we tried to do was get the first element from a vector.
The first thing Connor tried to do.
Correct.
And since then, and so initially I thought it was
you had to go into iter.next.unwrap.
But then Bryce, while we were doing this live,
Bryce was like, why can't you just do bracket, zero bracket?
Bryce realized the reason I never tried that was because in C++
the way I would do it is just vector
dot front and when I tried to do
that I found the next method
and in order to use that you have to do
iter and then unwrap but then
on Twitter and on Reddit
multiple people have pointed out to me have to say
the Rust community
lot nicer than C++ community so far.
Yep.
Just from what I had.
Well, we're going to wait to go on a tangent.
We're going to wait to go on a tangent.
But multiple people pointed out that there was also a third method called first.
So that is the actual equivalent of front on Vec.
But that's implemented on your structs, a.k.a. vector.
I might be getting some details wrong there.
Anyways, the point is that was our last episode, at least that we recorded.
So that was episode 101.
And then in the midst of all this, Bryce was kind of making fun of me.
He's like, we can't air this.
You look like an idiot. And I was like, first of all, Bryce, I don't know fun of me. He's like, we can't air this. You look like an idiot.
And I was like, first of all, Bryce,
I don't know anything about Rust.
This is just like how anyone learns a language.
I don't think I said that verbatim.
You didn't say it.
This is the part where Connor's going to edit in
me saying it verbatim.
No, you didn't say it,
but you implied that I would be ashamed
of what had happened.
No.
And I said, no, that's just,
that's how learning the language goes.
All right.
Little technical difficulties.
Speaking of things that people should be ashamed of,
at some point on this episode,
I need to talk about the Shinkansen Android app.
Like the Japanese bullet train?
Yes.
All right. We will maybe get to that. Anyways, we're wrapping up this Android app. Like the Japanese bullet train? Yes. Yes.
All right.
We will maybe get to that.
Anyways, we're wrapping up this
so that we can get Jane
to tell us her story
from C++ to Rust.
And actually,
you can go all the way back
before C++
if there was stuff
before that as well.
The point is,
we've slowly started
turning into a Rust podcast
and it was a little bit
of a stumble
on our first tackle at it.
And so I think it was Bryce that said, you know, what are we doing here?
You know, usually people just go and talk to people that know what they're talking about.
And he pointed that out, and I said, well, that's a very valid point.
And now here we are, a couple episodes later, talking to someone that actually knows what
she's doing.
And we're going to split this up into a couple different episodes.
So the first one, if you want, want you know tell us your path that brought you
to rust and then you can talk to us about working on the library stuff why rust is so awesome why
are the people in rust so nice i mean what did the c plus plus i'm not sure you probably don't
follow me on uh no actually do follow me on twitter i tweeted i don't use twitter much anymore
go okay so you probably wouldn't have seen twitter i tweeted i don't use twitter much anymore go okay so you
probably wouldn't have seen this i tweeted two different screenshots from posting episode 101
which i titled c plus plus developers try rust because i wanted to you know clickbait everyone
in to listening to it the rust people they were having a good laugh and they were like hey you
should go try posting because i i posted it i cross posted on both slash rust and slash cpp oh god
the rust people were like,
Oh,
this is great.
Here's a bunch of feedback.
You know,
you've made a bunch of mistakes,
but you're just learning.
It's okay.
And then there was like a sub thread where they were like,
you should go post this on C plus plus.
And I was like,
I already did.
And there's like,
Godspeed.
Good luck.
You're,
you know,
you're doing the Lord's work.
And then the,
the post to C plus plus got,
I should,
I should bring it up and read it. Actually, I'll just go find the tweet.
It's so funny.
Let's go to my profile.
I hope I'm bracing unnecessarily.
No, no.
It's definitely necessary.
And what's funny is that
I tweeted, so one of the people
STL
aka
LavaWade who works for Microsoft as a library implementer on C++, he commented,
has there anyone that's listened to this that can summarize if there's anything about C++?
And what's funny is the same day I tweeted out a quote or like a screen capture of him commenting on a PR that merged in zip to C++ 23, which obviously Rust
already has because Rust is a very lovely language and they know the important things to have.
And so at the same time, as I'm like being like, hey, yay, this is so awesome. And that got a
bunch of retweets. He's on this thread asking, does this have anything about Rust? The first
response, total length of the podcast is 22 minutes. Until minute seven, it's literally just blubbering about random topics, Twitter, and other useless stuff.
Oh, my God.
And then they proceed to summarize that we're comparing vec.front at sort of angle bracket zero, square bracket zero zero square bracket and sort of saying some other
deriding stuff and very uplifting stuff you know encouraging supportive other people said they
cringed anyways i i take this stuff in stride i love the internet i mean i i i cringe as we record
this um so that one's at least fair the end of that story is that we promptly were removed we got
kicked off of CPP
because apparently if it's
not directly about C++ it has
no space and might I
add because Jane doesn't know this we are the
number one active C++
podcast out there I think
we should just get like whatever we talk about
unless if it's like our movie
recommendations which admittedly we have done episodes about that stuff I think we should just get like whatever we talk about, unless if it's like our movie recommendations, which admittedly we have done episodes about that stuff.
I think that like C++ devs trying to make their way through Rust.
Sure, it's not about C++, but the point is Rust people, lovely.
C++, I won't call them not lovely, except for those couple people who did say some mean things.
Anyways, over to you, Jane.
Take us back to when you were born or whatever, you know, when you were 13, whichever age you'd like, and the story of how you got to Rust.
Well, I'll start with, you know, I got into programming right before college and took a CS degree and C++ is basically the main language I learned in my program and so went into my professional life doing C++ coding
I would not say that I was ever any level of expert or particularly engaged with C++ it was
like at that point it was mostly just a job and so like I learned about like L values and R values
like embarrassingly late in my C++ career and things
like that. And so like, definitely would never classified myself as a C++ expert, like even like
towards when I started learning Rust, I was still like, not someone who frequently leaned on
templates or many of the fancier features of C++. I'm sure me saying that's a fancier features like
your C++ viewers are like, Oh my god, she's not really a C++ and I'm sure me saying that's a fancier feature is like your C++ viewers are like oh my god she's not really a C++ programmer I think the nice ones are very forgiving but I have seen on
reddit like oh you don't know this feature well then you don't know C++ and I'm just like I think
all the true experts would agree with you like all the beginners all the beginners and all the
true experts would agree.
It's only the intermediate, like the folks in the middle of the curve who would be like,
oh, not everybody knows how to use templates.
They're so easy.
Yeah, I appreciate that.
And then, so into my third job professionally at a place called Scale Computing that does like clustered hypervisor shenanigans um we were doing
like maker nights or and we were doing a project to this is like the story of how i got introduced
to rust just you know and so before i go too deep into this tangent it's like where the hell is she
going um and so we're we're doing this project to make a like literal red button to start the test suite that is like
within our own like process called the canon which just like tests every test against every
hardware variation of cluster we have um like multiple times because it's a bunch of like
inconsistent tests that have spurious failures uh and so we wanted to make a comical red button
that would be able to,
you give it a build and you hit the button
and you turn the key
and it makes some silly sound effects
and sends a JSON request to the server
and gets it started.
And for that project, we're like,
how do we want to implement this thing?
And the options were like, we could do Python, which we all know, and we know it would work.
And then my friend Josh was like, we could try out Rust.
None of us know Rust.
So I was looking it up, and I remember seeing the Wikipedia article where it says something along the lines,
this language superficially resembles C and C++, but like semantically or semantically, it's actually more akin to the ML family of languages. And from one of my earlier jobs where I had worked on quadcopters with some
like Caltech professor people that had like one of them was, I would say lovingly, described
as a functional programming weenie.
And so very into ML, OCaml, and a bunch of these programs.
I remember him having me do a big project in XSLT to do like take an xml document and generate c++ and java and python
for a bunch of like struct parsing for telemetry data i remember i had he had instilled in me a
respect for ml and something like an interest but i had never really gotten into it i'd never
really actually taken the time to learn and so i see this i'm like oh that sounds like something
really interesting.
Like, I want to learn about this.
And so it's like, yeah, let's do Rust.
And very quickly fell in love and started using it for everything I could.
Mostly tooling for like, actually, like we had like a bunch of bash scripts for like,
like helping with remote development and just general workflows stuff that I was always angry at because bash just has horrible error handling and if you know anything about my rust involvement
I'm one of the other things I do is I'm the the lead of the error handling project group
these are related factors so I got into basically like rewriting all this developer tooling from
bash with horrible error handling into rust where I would put a lot of effort into the error handling. And I ended up still being
frustrated with kind of the state of error handling at that time. And looked into it,
figured out kind of what the problems were and started making changes and proposals to the
language itself. And that has since more or less snowballed
into being more deeply involved.
I guess there's like a step in the middle I missed
where when I was learning the language,
one of the ways that I wanted to improve my experience
or improve my knowledge was by like doing contributions
to the open source project and like working with people
who were actually like experts
just to kind of get firsthand exposure
to people who really knew what they're doing.
And so I did a bunch of contributions to Clippy,
the linter, and ended up joining the Clippy team
before I joined any of the other teams.
But yeah, from the Clippy team, I did error handling.
And then because of the error handling, I joined the Libs team. And I think between those was when I started for the listeners is why did you fall so deeply
in love with rust and can others too if they want to i i think i yeah obviously i think other people
can definitely follow with it um i think the the big things for me is it has it feels like it has fewer sharp corners and like it lets it feel like it lets me
offload more kind of like of the like the things i have to think about onto the language and the
like the type system then i felt like i couldn't c++ and i'm sure some of the c++ stuff was just
like personal inexperience um but with rust it while it was like definitely a lot to learn up front, the trait system feels like a lot more intuitive.
And it just makes a lot of sense to me.
I know that C++ now has concepts, I think, which are like...
They're not great, so...
Okay.
They fall short of what rust traits are.
Yeah. And so like having the trait system made like generic, something that actually made like
a lot of sense in a way that templates were never really obvious to me. Um, like I could, I had seen,
I had worked on code that had like spination and againigans, but I had never been able to fluently output spin A stuff
myself.
But being able to just add a where bound,
require that it has this interface,
and then now you can work with that type like it has that.
And it does, because the compiler will make sure
that only types with that interface
get passed in another side.
C++ can do at least that much, but the problem that C++ has,
and this will probably be something that you'll appreciate,
is that if your thing doesn't satisfy the requirements,
C++ concepts don't really have a good model for how to tell you it doesn't satisfy it in this
particular way. And so you don't really get a clear diagnostic. You're just like, hey,
you didn't satisfy this one concept. And if that concept is something like regular,
which is a concept that's composed of a bunch of other concepts, you're going to go spend hours
trying to figure out exactly how you failed to meet these requirements.
Yeah, the compiler diagnostics are definitely, I think, a big plus for Rust.
Esteban, shout out, does really great work, as do many other people who work on the compiler's error messages. The error handling I do has nothing to do with that.
And so I have nothing but respect.
And no credit is mine.
I find it interesting that what you haven't said thus far
is the whole memory safety thing.
And I think especially from the C++ world,
a lot of people are like, oh, that's like the feature of Rust. And I mean,
I think that was certainly one of the main motivations behind the origins of the Rust
project. But it seems to me like Rust has sort of grown beyond that. And like the thing that's
appealing, most appealing to Rust about me is sort of like the values of the language, like its goals, you know, having sort of ease of use and simplicity be a goal.
The focus on, you know, diagnostics on onboarding new users, the strength of its evolution process, how modern it is.
Like that's all what's attractive to me about Rust.
And that's, you know, has nothing to do with the memory safety thing.
But I think a lot of C++ people just assume, oh, it's all about the memory safety.
Yeah, I think I definitely, I think I take the memory safety for granted sometimes.
And so it's like, it's not even something I worry about very often.
And there's definitely contexts where it's like super important, but
I just, I just don't even like to work in a memory and sleep environment. Like, I guess there's a lot
of anxiety that I don't have to worry about as well. That it's just, I feel like the compiler
has my back. I mean, as soon as I touch unsafe, that anxiety comes back, but then I, it's like
a much more scoped anxiety and I'm able to like like send it to like a bunch of
friends or run it through Mary and there's like a bunch of ways to kind of still make sure that
everything's good in that regard run it through what Mary the interpreter ah yeah it's the it's
like the implementation of the abstract machine and it will it stacked borrows there's all of
Ralph Ralph Young's uh PhD work has gone into that and it's got some amazing technology in it.
We learned something new. Yeah it's slow though. I think they're speeding it up but it's still
pretty slow so you're not going to run like whole ass like web servers through it or anything but
you can you can do tests and especially on libraries you can verify unsafe abstractions pretty nicely with
mary yeah community is a big one i i think that like that was a huge difference for for me
personally with c++ and with rust it was like i never really figured like i'd wanted to do open
source contributions for years before like i got involved in rust but never never really found a way to do it or like comfort jumping in.
And once I got involved in Rust, I started following This Week in Rust, which is their
weekly podcast. And especially back when I started, they were really good about putting lots
of good first issues from the repo and some of the associated projects like clippy and rust rust uh rust
format and things like that and just like seeing that like kind of that steady call for action
like kind of making it easy to find places to jump in really kind of made the difference between
um being anxious and like kind of hesitant or like just being like you know what okay i'll
give this a shot and it definitely it wasn't like a completely bumpy unbumpy ride there were definitely like a few PRs where I
opened it up and just like kind of got crickets and so it took me a little bouncing around to
find a part of the project that where the reviews kind of came along faster um and you know where I
wasn't anxious and just worrying that people weren't replying because I was doing something wrong
you know on me
but eventually I did find that with
Clippy so yeah
Clippy I just discovered
Clippy today shout out to Mike Dom who just
randomly pinged me today
on discord and
I guess knew that I had said something on Twitter
about
trying to out rust a little bit.
And like, yeah, like, I mean, there's so much amazing things I could say about Rust,
but Rust Clippy, I was like, oh, first I got to go install it.
And then, so I ran some, you know, command line thing and it was like, it's already installed.
Like I did Rust up earlier.
So it was already there.
And then I just did Rust.
What did I do?
I did cargo Clippy and then it was already there. And then I just did rust. What did I do? I did cargo clippy.
And then it gave me a bunch of lint stuff.
One of them was actually something I Googled earlier.
I had one of these, you know, I wanted to see if X was either zero or one.
So in the bounds of zero or one and not outside of it.
And there's a couple of different idiomatic ways to do this in different languages like
Python, you know, blah, blah, blah.
Anyways, it doesn't matter.
I had just, it was like, screw it.
I couldn't really find a stack overflow, like idiomatic thing.
There was a couple of different answers.
So I was like, oh, just do the naive thing.
And then cargo clippy, it tells me like, oh, you should do like a exclamation
paren zero dot dot equal one n paren dot contains.
And then my value, I assuming that exclamation mark means it's like a compile time range
or something.
Anyway, I don't even know what was going on, but I was like, wow, that's amazing.
Like it literally gave me the idiomatic version of what I wanted of something that I Googled
for and like, couldn't find the answer.
And then they've just got a dash dash fix, which is like the first thing I checked as
I like, That was me.
Do I really?
Oh my goodness.
I added cargo clippy fix.
Yeah.
Thank you, Jane.
It was, it was wonderful.
And then I told him,
I instantly committed it to this,
my little toy repo,
sent it to Mike.
And then Mike was saying,
oh, I actually,
I like to, you know,
manually fix them to sort of
get it more ingrained in my memory.
And I was like, you know,
I reviewed everything.
It was basically just deleting a bunch of unnecessary clones,
changing some into itters into itters, which, you know, full disclosure, I don't understand
the difference. I'm like, I, and that's the thing about, do you want to know? We'll get,
we'll get, I want to know. I, I basically, I feel like I'm sprinting most of the time,
even though I don't know rust at all. And this is something that John or JT, Jonathan Turner said on a Go versus Rust panel,
is that because it's got so much safety baked into the language, when you do PR reviews and stuff,
you don't actually have to worry about a whole set of code review things.
And when he said that, I realized it's like, wow, I don't actually know what I'm doing.
But you're kind of allowed to run with knives in Rust because like the
compiler won't let you stab yourself or shoot yourself in the foot.
Like not for everything.
I'm sure.
I'm sure there's some ways you can run into panics and whatnot, but like logic errors
and stuff like it's, that's not like bug free code, but exactly.
But there's a whole set of things where like, you're always going to shoot yourself and
see your C plus plus. And here, here I am. I'm just like sprinting with the knowledge
that I have from every other language. And then every once in a while I run into something where
I'm accidentally moving. And you know, I haven't figured out the fact that it's moved by default,
but like, I'll get stuck on that for like 10 or 20 minutes and then I'll fix it. I'll be like,
okay, now I need to know that I have to do doc copied on this thing. If I am coming from a
slice or something. And anyways, then I go back to sprinting with knives and it's like, it be like, okay, now I need to know that I have to do dot copied on this thing. If I am coming from a slice or something.
Anyways, then I go back to sprinting with knives and it's like, it's like, that's so amazing.
It's like beginners.
You can just like get a bunch of people that don't really know what they're doing and just
say like, go for it.
And like, that's, that's like pretty novel for like not having to hold a beginner's hand
and like half the time click Clippy and the compiler,
they're just like the compiler messages you're getting is like, did you mean to do this? And I
was like, well, I don't know, but probably like I look into it and I was like, that is exactly what
I was trying to do. Fantastic. Anyways, back to you inter or iter versus into iter.
Okay. I also, just before I get into iter versus into it, or also have you checked out the dash dash explains
on any of the errors you run into?
I have not, because I feel like I did that once on rust playground.
And my impression of it is that it just like gives you the same message or something.
So clearly my impression of what that does is, is completely incorrect.
Yeah, no, it there's basically, there's a bunch of like long form markdown documents,
deep detailing, like, like basically like mini lessons about like pieces of the language for like, that
are relevant to error errors.
So like if you run into like an error about misusing a trade object and you do like the
dash dash explain E, then the number code that represents that that's associated with
that error, it'll be like trade objects in Rust work this way and this and this and this.
And it gives you like really nice, detailed explanation.
And it's a good time.
Interesting.
And that sort of checks out with something that someone said on the Rust subreddit, is that they said a lot of the times, Stack Overflow actually isn't the place to go.
It's like, the Rust docs are so good, and the Rust ecosystem, that a lot of the times you can find the answer in the compiler
in the docs or something like that because accessing the first element didn't have, I
don't think even one of the answers was dot first or maybe it was and I missed it.
I will definitely check that out.
Maybe one of these episodes, Bryce and I will do a live coding again, except we'll record it and post it
to YouTube. And then we'll, we'll be blown away by these explainer explainer messages.
Also, have you seen rust analyzer yet? Yes. That was one of the, I had heard from
a podcast that had JT on it that he said like, that should be like the number one thing you get,
like you rust up and you get cargo. And then you, if you're hopping to VS code or wherever you are, get the rust analyzer.
Yeah.
It's, it's, it's very, very, it's a very good language server.
What is the rust analyzer?
It's the language server.
So it's like a query based version of the compiler and it shares a lot of the dependencies
and implementation with the compiler as well.
And so it's like, it's just very fast.
Why do I, why do I want it? Like, what is it? It's like the equivalent of having playing the, um, with like all the auto-complete stuff
and C++, like without that, you're not getting any suggestions. You're not getting any lint hints.
You're not getting any compiler hints. It also has like code actions. So like you can use it to invert expressions,
to outline or inline variables, to take some body of a function
and automatically split it out into a separate function,
things like that.
It also lets you jump around.
So you can go to definition on any type or variable.
Or if you're on a function function you can be like go to references
and a list everywhere that functions used in the code base and you can like really quickly
jump through those and there's probably a bunch of other things it's really i think it comes with
with rust format as well which and you can set it up to run clippy and all sorts of stuff yeah
honestly it's like i get the sense where we would
i promise we'll get to the iter versus into iter thing but i feel like like there's other reasons
that i'm really liking rust but like one of the things is that it's like c++ but with guaranteed
like a bunch of the sanitizers because the memory safety stuff and then like built in from scratch clang format clang tidy a bunch of other
stuff c++ 2023 ranges and like everything that we're missing in the iter trait like honestly
i basically just used iter the iter trait because it's it's so phenomenal everything that we want
in c++ is there in rust you want to numerate it? It's there. You want zip? It's there. You want a bunch of
other ones, flat map? It's there. And oh, speaking of flat map or map, the reason Mike Dom pinged me
about Clippy was because the message it gave him, it reduced like eight lines of code to a single
line that said you have manually implemented option.map. And I was just like, what? How does it?
Oh, man, like it's it's you have to see it.
I will somehow find a way to post that in the show notes of the diff because it's quite
phenomenal.
There's some great clippy lids.
Tune in next week for part two of this three part interview.
Thanks for listening.
We hope you enjoyed and have a great day.