No video

Zig's enum-switch pattern is awesome | Zig tutorial part 2

  Рет қаралды 3,932

Matt Freire

Matt Freire

Күн бұрын

Пікірлер: 13
@lilzin69
@lilzin69 Жыл бұрын
Nice video! thanks for share! some cool observations: > 1. You can use the pattern `return switch(...) { ... }` ( i like it ); > 2. There's no need (sometimes) to type- annotate some variables ( like in `const score: i8 = switch(...) {...}` ) > 3. zig's style guide is, sometimes, interesting... I'm expecting the part 3!!
@simonralek7605
@simonralek7605 Жыл бұрын
Very nice video, looking forward the next one!
@CoolestPossibleName
@CoolestPossibleName 11 ай бұрын
Is ok to do that decrypt function something like this to have just one function? 'A' => .rock, 'X' => .rock, 'B' => .paper, 'Y' => .paper, 'C' => .scissors, 'Z' => .scissors,
@CallousCoder
@CallousCoder 11 ай бұрын
Nicely done. Initially is shivered about that nested switch, but it actually became very readable. There’s no need to type a const or a var when the compiler can infer it, saves a bit of typing.
@mattfreire
@mattfreire 11 ай бұрын
Hey! So cool to see you here. I remember watching some of your zig videos. Yeah I've been adding types unnecessarily and now forming a bad habit lol
@CallousCoder
@CallousCoder 11 ай бұрын
@@mattfreire You watched some of my tiny channel's videos! NICE! I really adored watching yours. The thing is you always pick something interesting up. Just looking to see how another person solves a certain problem I find useful. And in this case I was like... Hmmmm why??? Oh.. actually that looks really really nice! I am currently working in my own "sexual innuendo style" pin a series of embedded coding a Simon says game with Zig. It is not finding the same traction as my first Zig video though. Which I find interesting because Zig would be the best alternative for C on microcontrollers. Then again us embedded people tend to be very conservative :D But I am having fun doing it, its for me merely documenting what I do as a hobby. Although this I had initially done in Forth. Keep up your great work man! Your content is very nice you have a great knack explaining this, far more than I have! And let's hope that our little contributions help people to cross that threshold and also use Zig. It was also the community that made Rust big. And I like Rust too btw but I adore Zig.
@mattfreire
@mattfreire 11 ай бұрын
Thank you for the kind words. I agree - it's always good to see how other people solve problems. I plan on learning more about microcontrollers so I'll be sure to follow your series! Absolutely. I think people want to see a lot more zig content. Our little contributions will add up. It makes me excited for the future of zig and it's community
@CallousCoder
@CallousCoder 11 ай бұрын
@@mattfreire yeah me too! If foresee a great future for Zig. When something that even by the key maintainer is qualified as not production ready is already so good and usable, will make me wonder where it will end up. And I really like the group of maintainers, no political nonsense like we see in the Rust community. They are all super helpful and active. Great lectures that they organize. I truly feel excited when I watch anything zig related. And for an old guy like myself to be excited again for something in IT is unique 🤣
@kknaful
@kknaful Жыл бұрын
is it for zigzag?
@tahir-zaqout
@tahir-zaqout Жыл бұрын
great session 🥰 can you make a wonderful project by django please !
@ThomazMartinez
@ThomazMartinez 11 ай бұрын
im confused, defer is to remove the variable from memory right? why its called before its being used?
@mattfreire
@mattfreire 11 ай бұрын
Defer will execute an expression at the end of the current scope. Take a look here at the zig docs: ziglang.org/documentation/master/#defer
Hashmaps and a cool ASCII trick | Zig tutorial part 3
35:26
Matt Freire
Рет қаралды 1,9 М.
This memory pattern is why I'm using zig | Zig tutorial part 5
33:24
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 153 МЛН
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 3,7 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН
PayPal Payments Tutorial with Django and React
47:16
Matt Freire
Рет қаралды 10 М.
INSTALLING ZIG ON WINDOWS! THE EASY WAY
7:14
kabwoy the programmer
Рет қаралды 976
What is the future of Django / Is Django becoming obsolete?
19:35
NVIDIA Needs to STOP
11:35
Linus Tech Tips
Рет қаралды 1,2 МЛН
Zig string parsing | Zig tutorial part 4
23:51
Matt Freire
Рет қаралды 2,4 М.
AMD Ryzen 7 9700X vs. 7700X: 40+ Game Benchmark [23H2 vs. 24H2]
26:24
Hardware Unboxed
Рет қаралды 113 М.
Zig programming language tutorial - Part 1
46:47
Matt Freire
Рет қаралды 34 М.
7 concepts you should know to get a job as a Django developer
23:12
Django Dynamic Forms Tutorial with Htmx
48:27
Matt Freire
Рет қаралды 67 М.