Rainer seems like a great guy. Helpful, clear, and humble.
@建平許3 жыл бұрын
Awesome! The speaker has a great passion for Rust.
@nirmalyasengupta6883 Жыл бұрын
Yes, the passion is showing. Great.
@pyrysaarinen49542 жыл бұрын
This is the most enthusiasm i Have ever seen for someones cause
@yapayzeka Жыл бұрын
15:30 according to Rust docs; use From for imlementation and use Into for trait bounds. Examples: Implementing From you can see in the video: impl From for SquareContent { ... } Trait bounds for Into only accepts parameters that are castable to SquareContent. we implemented From earlier so we can pass u8 because we know how to make SquareContent from u8; fn my_super_function(param: T) -> SquareContent where T: Into, { ... }
@9SMTM63 жыл бұрын
Nice so far. Just a small nitpick, at 13:20: Pretty sure that "Auto-Implementation" is already (pretty much) used for something else, and even ignoring that thing there's other mechanisms that could be named the same. Auto-Trait-Implementations is reserved for things that a user usually doesn't interface with directly, stuff like Sync (which gets imemented automatically on any type that is made up out of elements that implement Sync), Send etc. These get implemented entirely without user interaction, while the things refered to in the talk still need to be explicitly opted in, even if that is with minimal boilerplate. These traits refered to in the talk, eg Clone, Copy, Hash etc, are called "Derivable traits". There's also YET ANOTHER mechanism, called "Banket Implementations". These are also powerful and interesting. One example is the Conversion Traits "From" and "Into", which can handle eg conversions between &str and String. As the documentation of these mentions you usually only want to Implement "From" on the target type, this will automatically create an implementation of "Into" on the source type via Blanket Implementation. So, if you implement "From for String" the compiler will generate a perfect implementation of "Into for &str".
@2002budokan2 жыл бұрын
The essential ideas behind the traits are explained by a passioned developer. Thank you, this is the first time that I see a trait is more than an interface.
@robinmoussu2 жыл бұрын
I love your energy Rainer. That’s a great talk that I will recommend.
@irlshrek2 жыл бұрын
loved this! genuinely helped me understand traits better
@sumansaha2952 жыл бұрын
This is a very in-depth video about rust features. Thanks!
@willinton063 жыл бұрын
Rust is so ahead of the curve, as a C# guy I’m kinda jealous
@SimonClarkstone3 жыл бұрын
I'm a C# and Java programmer, and I would like to use them too. As one of the attendees pointed out, Rust traits are similar to typeclasses in Haskell, which have been around since the 90s at least. (I am familiar with them in Haskell.)
@marko-lazic Жыл бұрын
Thank you so much. I filled some gaps about traits by watching the video.
@thalianero10712 жыл бұрын
I’d like to take a moment to say that a tied tic-tac-toe match is called a “cat’s game”
@frroossst426711 ай бұрын
This is an absolutely amazing talk!
@nickschmitt85943 жыл бұрын
What an incredible educator.
@Amapramaadhy Жыл бұрын
I was confused by the `From`/`into` until it dawned on me that you are _not_ doing a reverse operation! It was subtle for me. Using pseudo-code, `Widget::From(1)` can simply be re-stated as `1.into()` which returns the same widget. This way, its a different syntax for writing the same thing that can come handy in some situation, e.g more ergonomic api with chained operation. (This would be very different from say `Widget.into()` to return a 1 but thankfully thats not whats happening here. )
@Gruby7C1h Жыл бұрын
Exactly, having "impl From for Sausage" doesn't magically implement a conversion that would allow us to make the poor pig back from our meal.
@luizchagasjardim3 жыл бұрын
Oh, man. I need to learn German to understand traits? XD Just kidding. Awesome talk. I would recomend it to all people looking into learning Rust.
@saaddahmani18702 жыл бұрын
Awesome explanation for C# coming developers... from C# developer !!.
@sbrugby13 жыл бұрын
Strong Christolph Waltz vibes
@Raleighthrbub1232 жыл бұрын
Well, he's Austrian so that would make sense. Excellent energy. Really commands your attention and makes you hyped (or scared) lol.
@peter94772 жыл бұрын
That feeling when Dr. Schultz is teaching you Rust...
@ikhlasulkamal5245 Жыл бұрын
Wait, did you said Ferris cake? I want one please
@Zaniahiononzenbei2 жыл бұрын
I'm definitely confused with implementing into_iter. I'm understanding that you can add "parameters" to interfaces in some sense. Essentially, only as types. All I can see from the example is a daunting pile of various versions of "into" and "iter", with various joining characters. It makes sense to inform the compiler that the calling code will get an item of a specific type when iterating. It makes sense to reuse the into_iter implemented on an array. I'm having difficulty understanding the function. If I'm understanding the code right, we're saying we're going to return the same type that calling into_iter on an array of length 9 would return? Are these identical? IntoIterator::Into_iter(self.board_content) self.board_content.into_iter()
@piguyalamode164 Жыл бұрын
Yes, IntoIterator::Into_iter(self.board_content) and self.board_content.into_iter() should be identical identical(as well as Self::into_iter(self.board_content), and ::into_iter(self.board_content) I believe)
@joelmontesdeoca65722 жыл бұрын
What a mind blowing talk!
@erc_io2 жыл бұрын
Can someone give me the German at 33:16 when talking about From implying Into?
@robert36902 Жыл бұрын
"Eine Fähigkeit auf Basis eine anderen Fähigkeit ableiten" is what it sounds like to me. To derive a trait based on another trait, or something like that.
@victorfds2 жыл бұрын
The speaker is awesome. 🤓. I really liked the code examples.
@kamilzielinski504 Жыл бұрын
very good examples
@i.85302 жыл бұрын
Great talk, I learned a lot from it!
@JohnPywtorak Жыл бұрын
Hi great talk, thank you. Small thing at 18:00, not really automatic magic, more fully qualified syntax since default doesn't have a Self receiver as I just learned. It threw me and I didn't understand other than the obvious thing happening. It is like ::default().
@func0der2 жыл бұрын
Thank you very much for this very clear talk.
@mario7501 Жыл бұрын
Great talk! I like to always include the return statement though. It makes code more readable I think.
@user-jt7wb3zc1m2 жыл бұрын
Cool! Amazing talk! 🦀
@СергеичЪФ3 жыл бұрын
Good!
@jensen71413 жыл бұрын
👏👏👏
@brogen1003 жыл бұрын
I want to double like
@nteasushz3 жыл бұрын
🍺
@theimmortalsinger376210 ай бұрын
"let me just say one sentence in german so that the whole audience gets it." Says it. Doesn't translate. Wut?