Rust - First Impression [Programming Languages Episode 3]

preview_player
Показать описание

►Lesson Description: In this lesson we do a tour of the Rust programming language -- which is one of the more popular languages these days! Many folks have asked why I don't do more Rust videos, and until now I have not done any significant Rust -- let's see if I'm convinced with the language and ecosystem!

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

Rust moves values by default, to copy them, you use `clone`.
to borrow you get a reference.
to borrow mutably, you get a mutable reference.
a mutable borrow is exclusive, meaning you can't have any other kind of borrow, it works similar read write locks.
This prevents bugs like mutating a vector while iterating through it.
Arc is similar to shared_ptr, Rc the same but the counter isn't atomic
by default in rust everything behave like a unique_ptr except if it implements the Copy trait, which marks it as trivially copy-able in C++ terms.

Codotaku
Автор

i'm really interested in rust after this video thank you. picking up a fundamental tutorials course on this by saturday and learning it.

jesuschrist
Автор

A language with a higher learning curve indeed. I'd like to put some more effort into it over time, and I do wonder how the experience is working in a large project. The safety guarantees at compile-time however are super valuable as we know.

MikeShah
Автор

The use 9:20 the use was fine in the function. It was the same warning, unused. Maybe you got that already.

JohnPywtorak
Автор

String always heap allocates even if it is declared as immutable. If you want string literal stored to your executable you need to use str type like this:

let a = "my hard string";
// or with type:
let b: &str = "my hard string2";

// You can also define these in global space as consts:
const MY_CONST_STR: &str = "hard3";

meanmole
Автор

this is a good one!!! Did a little bit of Rust stuff a little over a year back, it was pretty nice coming from TypeScript

klutch
Автор

FWIW there is a rust wrapper for gdb rust-gdb, which was installed with rustc etc. It loads the rust gdb python helper scripts, and you can use gdb.

JohnPywtorak
Автор

Up to this point in time: I prefer V; I still have to convince myself that it lives up to my expectations…

bsdooby
Автор

in rust move = destructive bitwise copy, always available for all types

luckystrike
Автор

This is a great series, thank you Mike

Southpaw
Автор

The much awaited Rust First Impression :-) When going through the Go and V documentation, one thing that was mentionned is the simplicity and the ability to come back to code years later and still be able to understand it easily. This is exactly the opposite with Rust in my experience. After struggling to get my code compile (ownership...), and leaving it aside for a few weeks, I am unable to explain why I wrote the code the way i did... I'm probably not persistent enough :-) I certainly understand the need for such a language, but it is too complicated for me and for my personnal usage.

bruno-zlqn
Автор

No! Give me C anii time otherwise, I'll be back to Fortran :)

Ptr-NG
visit shbcf.ru