Getting familiar with Rust's syntax

  Рет қаралды 1,560

Francesco Ciulla

Francesco Ciulla

Күн бұрын

Пікірлер: 19
@Zhwazi
@Zhwazi Ай бұрын
1:58 Rust has a return keyword. Returns are implicit at the end of a function, and leaving them implied at the end is idiomatic, but early returns still use the return keyword.
@francescociulla
@francescociulla Ай бұрын
you are right! I think this is the best way to introduce it to the beginners, but thanks for pointing it out!
@Brocodefound1677
@Brocodefound1677 Ай бұрын
Finally here 😃 Francesco where is the practise excercise?
@francescociulla
@francescociulla Ай бұрын
what do you mean?
@ossurf
@ossurf Ай бұрын
Francesco n. 1!!!!!!!!!
@francescociulla
@francescociulla Ай бұрын
ecco il secco!
@ossurf
@ossurf Ай бұрын
manca poo ai 300.000!
@francescociulla
@francescociulla Ай бұрын
quasi!
@ok-alarm
@ok-alarm Ай бұрын
still struggling with lifetimes and some ownership rules. 😅
@francescociulla
@francescociulla Ай бұрын
I can feel you, have you checked the dedicated videos?
@antoniong4380
@antoniong4380 Ай бұрын
The way you explain Return and lifetimes might cause misunderstanding.
@antoniong4380
@antoniong4380 Ай бұрын
Return are optional keywords. Can be used to do an early return instead of "There's no return keyword". Or rather, it should've been "Has implicit return" Lifetimes analogy would make more sense if you say "I can't leave yet because you have my 'ticket plane'" instead of "You haven't returned my book" This (oversimplified) implies that an action can't be done because the green-ticket to do something is currently held by someone else. Also, the example of the function isn't really helpful. It is more relevant to the callsite, instead of the function body. In the context of the function, the return lifetime will be the overlapping range(or shortest lifetime) of both parameters. This nuance, however only matters to the callsite, and is easier to see why lifetime would matter.
@francescociulla
@francescociulla Ай бұрын
Hey Antonio, yes you are correct. I use the return keyword and I thought this was more to show the beginners the best practice, but yes, there's the return keyword in Rust and I probably will make a comment about this. About lifetimes, that's a nice analogy, I should have used it. Thanks for taking the time to write this!
@xl0xl0xl0
@xl0xl0xl0 Ай бұрын
Is this video AI-generated?
@francescociulla
@francescociulla Ай бұрын
no it's me reading and there is an editor
@Dev-Dojo-channel
@Dev-Dojo-channel Ай бұрын
Respected sir, please make the rust series from begginer to advanced. You are a phenomenal teacher 🎉🎉🎉. Please do it.
@francescociulla
@francescociulla Ай бұрын
Hi dev dojo. Here si the playlist you are looking for: kzbin.info/aero/PLPoSdR46FgI412aItyJhj2bF66cudB6Qs
@Dev-Dojo-channel
@Dev-Dojo-channel Ай бұрын
@francescociulla I already started following it. It's a 💎. Thank you Sir.🙏
@Dev-Dojo-channel
@Dev-Dojo-channel Ай бұрын
@francescociulla add some real world projects SIR, please 🙏
Actix Web - The Rust Framework for Web Development - Hello World
4:45
Francesco Ciulla
Рет қаралды 1 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 336 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
HashMaps & Dictionaries, Explained Simply
22:44
Nic Barker
Рет қаралды 12 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 196 М.
Rust for the impatient
10:43
No Boilerplate
Рет қаралды 769 М.
The Rust Survival Guide
12:34
Let's Get Rusty
Рет қаралды 175 М.
The Genius Way Computers Multiply Big Numbers
22:04
PurpleMind
Рет қаралды 296 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 159 М.
I spent six months rewriting everything in Rust
15:11
chris biscardi
Рет қаралды 451 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Advanced Pattern Matching in C#
26:24
dotnet
Рет қаралды 11 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН