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 Жыл бұрын
Very nice video, looking forward the next one!
@CoolestPossibleName11 ай бұрын
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,
@CallousCoder11 ай бұрын
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.
@mattfreire11 ай бұрын
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
@CallousCoder11 ай бұрын
@@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.
@mattfreire11 ай бұрын
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
@CallousCoder11 ай бұрын
@@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 Жыл бұрын
is it for zigzag?
@tahir-zaqout Жыл бұрын
great session 🥰 can you make a wonderful project by django please !
@ThomazMartinez11 ай бұрын
im confused, defer is to remove the variable from memory right? why its called before its being used?
@mattfreire11 ай бұрын
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