How Rust's println! macro really works

preview_player
Показать описание
In this rust programming tutorial, we pull back the layers behind the println! macro and show how this rust macro really works underneath the hood.

We will look at how you can write to the terminal without using a macro and how to build our own equivalent println macro. at the end of this video, you'll truly know how the macro works, and unlock the secrets of hello world in rust.

Almost every Rust Programming tutorial skips past how Hello World actually works. Those 3 lines of Hello World are very beautiful in the Rust Language, but there is a lot going on behind the scenes to make it so pretty. In part 2 of this 3 part series, we look behind the scenes of the println macro in rustlang and show how it really works.

In this tutorial, we'll look at:

- what a rust macro is and how to create one
- how to import from stdio
- how to write to the terminal with stdout
- how to write our version of println

#rustlang
Рекомендации по теме
Комментарии
Автор

These videos are insanely awesome. I LOVE the verbosity. Most of the internet videos are a high level abstraction of "what is programming". This breakdown of "What is happening when we program" is what's lacking in engineering these days! Well done :)

_Spartan-_
Автор

one thing missed was mentioning flushing in expansion of what println does under the hood. also loved the debugging part (that it feels like you were going to edit out but either chose not to or forgot)

samuelgunter
Автор

Nice way to present!
You in the background of transparent windows. Blue light, Red glasses xD
Sometimes it seems Matrix :P

LeandroCoutinho
Автор

I'm not sure, but judging by the shape of the microphone you should speak to it from the longest+widest side.

andrew_
Автор

Love the presentation of this, plus Rust is awesome if a little frustrating (thanks to Rustlings for a great guided tour though)

How did you create this transparent effect please?

JavierHarford
Автор

The format macro is like the println macro but on the go! lol

Ryan-xqkl
Автор

Hi Chris, i'd LOVE a comparative between Rust and Zig

mytvhome
Автор

This explanation missed an emphasis on the fact that println!() supports an arbitrary number of parameters. The advantages of using macros mentioned in this video, i.e. reducing complexity, apply to regular functions too.

paulkre
Автор

18:35 I suggest cutting out this section since it's essentially a bad take with no comments.

andrew_
Автор

For 100% of the people using rust go was more than enough! Shit actually and overkill! Why did you leave python? Im so sick of this bs

aftalavera