Rust Enumerations

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

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

  • @bryanenglish7841
    @bryanenglish7841 4 ปีที่แล้ว +7

    This series is easily the best Rust tutorials I've seen.

  • @sudhir1274
    @sudhir1274 4 ปีที่แล้ว +22

    This is a very good tutorial on Rust. One of the best I have followed. This tutorial really improved my understanding of the language and clarified a number of issues I did not fully comprehend. Thank you for creating and sharing.

    • @dougmilford7814
      @dougmilford7814  4 ปีที่แล้ว +5

      This was the very first video I created as a test on whether these videos could be of high enough quality to do a full series. I'm glad it stood the test of time and that you found it helpful :)

    • @seewhatseeabc
      @seewhatseeabc 2 ปีที่แล้ว +1

      @@dougmilford7814 This is high quality. Better than the ones in udemy.

  • @kennethmarete5329
    @kennethmarete5329 ปีที่แล้ว +1

    Hi @Doug Milford, please create a short videos like this one on use of lambdas, closures and use of move keyword in Rust. Your content articulates concepts and am able to remember these tutorials throughout my coding sessions. I have made them my anthem. Thank you for this @Doug Milford.

  • @dougmilford7814
    @dougmilford7814  5 ปีที่แล้ว +5

    Thanks for clicking 'Like' and Subscribing!

  • @arturczajkowski4255
    @arturczajkowski4255 4 ปีที่แล้ว +5

    I simply love your way of presenting and explaining. Professional and pleasant. Thank you.

  • @WarrenBey
    @WarrenBey 2 ปีที่แล้ว +1

    I'm learning Rust. The rust book is very verbose and great. But your videos are helping as a learning aid.

  • @irlshrek
    @irlshrek 2 ปีที่แล้ว +2

    What do we have to do to get Doug to come back!?

  • @WorstDeveloper
    @WorstDeveloper 4 ปีที่แล้ว +2

    Wow, these additional features seem very handy. I don't know if I've seen them in other languages.

    • @dougmilford7814
      @dougmilford7814  4 ปีที่แล้ว +2

      Agreed. I nearly fell out of my chair when I first saw them. I've seen something similar with Redux in Typescript, but not nearly as neat and clean as Rust did it.

    • @SimonClarkstone
      @SimonClarkstone 4 ปีที่แล้ว +1

      Rust gets them from the ML family of languages, such as OCaml and Haskell, which call them algebraic data types (based on turn on Type Theory). Rust gets quite a few other things (partly) from them, including traits, restriction of mutability, and the strictness of the compiler that catches many forms of mistake before you program is compiled.

    • @arpit_shukla
      @arpit_shukla 3 ปีที่แล้ว

      Maybe you haven't come across Kotlin sealed classes yet, they are really powerful as well.

  • @karelhrkal8753
    @karelhrkal8753 2 ปีที่แล้ว +1

    4:50. Damn, didn't know about that one. It would be fantastic if it could be converted to a JSON object for WASM bindgen, I will have to take a look at it someday.

  • @hansisbrucker813
    @hansisbrucker813 4 ปีที่แล้ว +3

    So they are more like algebraic data types 🤔

  • @RahulAhire
    @RahulAhire 2 ปีที่แล้ว

    Hi I have a question that when should I use enum? Is to maintain type strictness just to ensure nothing gets un-utilised?

    • @irlshrek
      @irlshrek 2 ปีที่แล้ว

      I'm new but I'm pretty sure the best time to use enums is when you have *variants* of some class of abstract data that need to be differentiated from one another

    • @RahulAhire
      @RahulAhire 2 ปีที่แล้ว

      @@irlshrek From what I'm seeing the example on stackoverflow and others, its seems its a good usecase to use enum when you want to use match statement. It does have fixed data typed for checking.

  • @KiffinGish
    @KiffinGish 4 ปีที่แล้ว +1

    Good overview!

    • @dougmilford7814
      @dougmilford7814  4 ปีที่แล้ว +1

      Thanks! This was literally the first video I made as a test on whether I wanted to do a full series or not. I'm glad you liked it :)

  • @bobweiram6321
    @bobweiram6321 3 ปีที่แล้ว +1

    There's an uncanny similarity between Rust and Swift. Rust's syntax is clearer.

  • @MarkusBurrer
    @MarkusBurrer 4 ปีที่แล้ว +1

    Good tutorial, but one mistake. Don't use float for money

    • @dougmilford7814
      @dougmilford7814  4 ปีที่แล้ว +3

      Ha, ha, ha... you got me :) Rust doesn't have a built in Decimal type. There are crates that you can use, but I was just trying to get the concepts of Enums across without side tracking. Your point is well taken, though :) Hey kids!... Don't use float for money!!!