Zig Bytes 0x03: If Statements & Expressions

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 44

  • @ZigIsGreat
    @ZigIsGreat  2 หลายเดือนก่อน +10

    I apologize if the audio sounds strange at all in this one! My microphone totally gave up on me at the worst possible time, so I need to get a new one... 😓
    If it helps at all, I've just added English subtitles that are much more accurate than the automatic ones!

  • @SaMusz73
    @SaMusz73 2 หลายเดือนก่อน +2

    Nice episodes, Zig deserves good community content producers. Great job!
    the jump from assignments to arrays was quite huge, without going into details of the type system IMHO. Splitting if while and for is a good choice. Expectations are high in the comments, great job at reading them and implementing the desired changes.
    The capture syntax in the if statements is really cool.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +2

      Thank you very much!! ❤️
      I agree with everything you said, especially the first part about the jump - I've been trying to improve that since, and appreciate you letting me know that. The feedback is extremely helpful and I try to do everything I can to make this work for everyone :)

  • @venir_dev
    @venir_dev 2 หลายเดือนก่อน +9

    this was VERY clear, it's very accessible even for beginners. great content! keep it up!

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +2

      I'm glad I did the topic justice!! I was worried it would be too much. Thank you so much!! 🥰

  • @sanderbos4243
    @sanderbos4243 2 หลายเดือนก่อน +1

    Great episode! :)

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      Thank you so much!! ❤️

  • @jorgegomes83
    @jorgegomes83 2 หลายเดือนก่อน +5

    Great video! Thanks!
    The code examples are way better now: not too small for smartphones and more vibrant colors. Thank you again.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +1

      I'm so glad to hear that!! Thank you for letting me know again ☺️🙏

  • @vincentl7022
    @vincentl7022 2 หลายเดือนก่อน +2

    Capturing values for If, switch and loops is so good because often the meaning of a variable changes in the context of the scope. I find myself writing less comments in zig because this additional name makes it clearer

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +2

      I really love this pattern too! It really reminds me of Rust's closure syntax, but applied to all of the conditionals.
      If you also use ZLS, the type hints are really good too! It just makes the development experience a whole lot nicer in my opinion.

  • @jwr6796
    @jwr6796 2 หลายเดือนก่อน +1

    Very interesting! As a programmer, I've been itching for some of the meatier topics and what makes Zig different, and this definitely gave me a taste!
    if syntax handling ternaries, optionals, and error unions is really elegant and simple! I'm gonna enjoy playing with this when I can finally get away from JavaScript (for work 😅) and dig into some funtimes programming.
    I've dabbled a bit in Rust and like a lot of the syntax. These if options and exhaustive switch branches go a long way toward making up for no match statement!

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      That makes me really glad to hear you say that!! This was also one of the things that got me really interested in Zig, as optionals in Rust specifically can really tedious to work with.
      I think you'll probably like while and for loops in that case too ☺️

  • @0z2ae
    @0z2ae 2 หลายเดือนก่อน +1

    your videos are 🔥 keep it up

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      You're incredible, thank you!! 🙏

  • @alexanderzikal7244
    @alexanderzikal7244 2 หลายเดือนก่อน +1

    I also say Thank You!

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      I'm glad I could help ❤️

  • @fishsayhelo9872
    @fishsayhelo9872 2 หลายเดือนก่อน +2

    very gud, once again 👍

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      thanks again friend 🙏

  • @christopherwood6514
    @christopherwood6514 2 หลายเดือนก่อน +1

    I really like the new colorscheme! What did you end up choosing for it

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      I decided on Tokyo Night by the incredible folke 🙏 the link should be in the description, I'll make sure!

    • @christopherwood6514
      @christopherwood6514 2 หลายเดือนก่อน +1

      @@ZigIsGreatoh i missed that. Anyways, great video again!

  • @PeterKilian
    @PeterKilian 2 หลายเดือนก่อน +1

    I would donate to help you with a new mic, but I happen to be really struggling myself 🙈
    Wishing you the best!

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      No worries at all!! I wish you the best as well ❤️

  • @WistiiGaming
    @WistiiGaming 2 หลายเดือนก่อน +2

    What tool are you using to make those slides? They look really nice and smooth

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      Thank you so much!! I use Canva for that! It's a surprisingly nice experience to work with too! ☺️

  • @JoeyXie
    @JoeyXie 2 หลายเดือนก่อน +1

    I prefer the rust syntax like if let and match to capture optional type

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      It's definitely a personal preference, but I get it!! It can be confusing to some people as well.

  • @jwr6796
    @jwr6796 2 หลายเดือนก่อน +1

    Hey man,not sure how to get you privately, but:
    1. Can you get your Kofi link in your channel and video descriptions? Would love to help, but can't seem to find it and would prefer not paying Patreon if possible. 😁
    2. The link to your Twitter/X account says the account is suspended?

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +1

      Haha, no worries! My email is zigisgreat@proton.me and I have that in my about page as well! It's always open ☺️
      To answer your questions:
      1. I can absolutely get my Kofi page back up! I DID actually have one for 2 seconds but deleted it because I was having doubts. I'll let you know shortly when it's back! ❤️
      2. Yeah, X really sucks. I'm waiting to hear back about my appeal, as this is the second time in a week that I've been suspended for "ban evasion" with absolutely no proof. Totally infuriating 😡

    • @jwr6796
      @jwr6796 2 หลายเดือนก่อน +1

      @@ZigIsGreat hey, no worries on Kofi. You don't need to go out of your way. If Patreon is your method, I'll support there.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      all good!! most of it was still ready to go, so it should be good now!

  • @tuna5618
    @tuna5618 2 หลายเดือนก่อน +1

    I'm guessing zig doesn't have any branching control flow (match/switch/case statements) because that's only for functional languages and also rust :(
    A shame.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน +2

      Zig has switch! That episode is coming up soon-ish! That may seem underwhelming, but it's actually really cool. 😉

    • @tuna5618
      @tuna5618 2 หลายเดือนก่อน +1

      @@ZigIsGreat Well that's better than nothing! Even if it's not as good at Kotlin's extremely basic pattern matching (idk why kotlin pattern matching is so stripped down) or the full pattern matching in functional languages and rust.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      I think it's pretty comparable to Rust at least! I still think Rust has slightly better usage, but it's close enough for me :)

  • @asdasd-by4hm
    @asdasd-by4hm 2 หลายเดือนก่อน +1

    Hello. Saw your post on reddit and it got deleted. Can you share your dots please?

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      I got suspended for some reason! 😓
      I don't have any publicly available yet but I promise I'm working on it!!

    • @asdasd-by4hm
      @asdasd-by4hm 2 หลายเดือนก่อน +1

      @@ZigIsGreatoh that’s unfortunate. Hope you’ll get unbanned. Cool vid btw.

    • @ZigIsGreat
      @ZigIsGreat  2 หลายเดือนก่อน

      No worries! I'm hoping it gets reversed soon. Thank you ❤️

  • @eineatombombe
    @eineatombombe หลายเดือนก่อน

    Why is your twitter suspended?