The capital letter sigma is used for summation because that's the first letter of the Greek spelling of the word "sum". The capital letter pi is used in exactly the same way for products for exactly the same reason. Heck, Leibniz morphed the capital sigma into an elongated S when he invented integrals to signify how closely related sums and integrals are.
@RafaelMilewskiАй бұрын
Awesome, LazyLock and LazyCell was a must have !
@petrusion2827Ай бұрын
LazyLock kind of breaks my mind. Is there a special case in the compiler for it, or is there some neat trick to make it lazy even though it looks like it is just getting assigned right away? It seems to me you'd need a lambda to implement it in a lazy manner. EDIT: nevermind, Instant::now is actually a lambda, Instant::now() would be an actual call do the now function. I've been writing a lot of C# lately so I've kind of gotten used to properties not having ( )
@josephsmith5110Ай бұрын
I was confused about exactly the same thing as well when I read the release notes.
@clarkmАй бұрын
I think OP mis-spoke when he said the expression to the right of the equals sign is lazily evaluated. It’s not, the expression to the right is evaluated at runtime just like anything else. The key as you noted is that you’re passing a function that will be lazily called and produce your value.
@CodyNeimanАй бұрын
For satisfying any curosities I highly, highly recommend a 2020 blog post by the creator of the series of PRs, matklad. It's called "Spinlocks Considered Harmful" and I feel is super beneficial to anyone learning advanced rust concepts.
@RootsterAnonАй бұрын
Very nice update! Thank you for making Rust videos for us!
@t3chrsАй бұрын
Thank you Nathan! Keep it going.
@samaelhelelАй бұрын
Love your outro....
@amanbains5474Ай бұрын
Very nice video and most importantly on the spot analysis , thanks a lot Nathan !!
@happytrashАй бұрын
I can’t believe you used Some(42) when a Sum-41 joke was just right there waiting for you smdh Thanks for the great update overview!
@MemplerАй бұрын
Small but fine changes in rust 1.80 Nothing too crazy except maybe the lazy static depreciation
@KaneYorkАй бұрын
2:56 The lack of those lints is actually what was blocking exclusive ranges in match!
@kirbykilledgodАй бұрын
I’ve started learning rust and to push my learning I was building an encrypted messaging app from scratch, at some point I wanted to get the bytes of a connected ip addr from the tcp connection and I thought I was insane for not being able to find out how to do it, good to see I wasn’t the only one though stupid it wasn’t a thing earlier
@davidmc971Ай бұрын
Cool, great overview of the new Rust version!
@qbasic16Ай бұрын
Wonderful presentation, thank you!
@RiwenXАй бұрын
Why are LazyLock and LazyCell not in core, though? Guess I'll keep using static_cell
@MichaFitaАй бұрын
LazyCell is in core::cell, but LazyLock in std::sync, what makes sense as there's no locking in no_std.
@AbdulfatahMohammedSheikhMohammАй бұрын
Thank you so much
@meka4996Ай бұрын
Thank you!
@0xZeeSАй бұрын
didnt really need the take_if - when the same functionality can be achieved in other ways. Adding too much unnecessary stuff to the language..
@thingsiplayАй бұрын
I don't get the need for an addition like take_if either. Usually the Rust devs have very good reasoning for inclusions like this. So I wonder what the actual reasoning was. It looks unnecessary to me too.
@yondaime500Ай бұрын
It's for people who don't like seeing the "else" keyword in their code. The implementation is literally just this: if self.as_mut().map_or(false, predicate) { self.take() } else { None } But to be fair, writing just take_if is more readable if that's what you are doing. I bet clippy is going to add a manual_take_if lint to annoy people as well :)