Beginner's Guide to Rust Data Types and Variables 🦀

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 30

  • @liquidmobius
    @liquidmobius 5 месяцев назад +1

    You seriously have the best Rust tutorials on YT! I'm really struggling with strings, more specifically the difference between String and &str (string slice), how are they defined and implemented, how to reference them, and how to work with them in general, especially regarding i/o. I'm sure you're really busy, but maybe you could consider covering this in a video. Thanks!

  • @sdlfljdfkl
    @sdlfljdfkl 6 месяцев назад +1

    I just discovered your videos, and I like them! Clear and to the point! I would rather say that the unit type is a type with only one value, so it's not really empty. And that value is the empty tuple: so the unit type is the type of the empty tuple.

  • @TrevorSullivan
    @TrevorSullivan  Год назад +1

    Check out the full Rust programming playlist! 🦀 ruclips.net/p/PLDbRgZ0OOEpUkWDGqp91ODn0dk7LPBAUL

    • @cincooitodois
      @cincooitodois 3 месяца назад

      thank you very much, trevor! youre awesome! really appreciate it

  • @kipkoech_nicholas
    @kipkoech_nicholas 2 месяца назад

    Watching this from Kenya and I can say I love your videos so much and it is helping me grow in the Rusty journey

    • @TrevorSullivan
      @TrevorSullivan  2 месяца назад

      @@kipkoech_nicholas congratulations on learning Rust programming! Thanks so much for your kind comment. I'm very happy to hear that you're benefiting from this video series. ❤️

  • @fuhrmanns
    @fuhrmanns 11 месяцев назад

    Your videos are really well done and the way you explain makes it easy to follow. Thanks!

  • @jasonbraithwaite9204
    @jasonbraithwaite9204 4 месяца назад

    Excellent tutorial, very well explained, thank you for this :)

  • @user-uv6wv7xz4q
    @user-uv6wv7xz4q 6 месяцев назад

    i was struggling to find a good course on rust as i am learning as my first programming language kind of, i do have a bit knowledge in c++ as i am doing competitive programmer(a beginner though), done no projects so i was struggling to get a course which will consider that someone might be learning some concepts for the first time. hope you continue growing and keep helping others !!

  • @gameisntover1289
    @gameisntover1289 2 месяца назад

    Thanks for sharing your experiences :)

  • @suvajitchakrabarty
    @suvajitchakrabarty Месяц назад

    Great video. Which of your videos can I check out for understanding borrowing and ownership?

    • @TrevorSullivan
      @TrevorSullivan  Месяц назад

      @@suvajitchakrabarty thanks! I haven't created one specifically on that topic yet

  • @mozark1043
    @mozark1043 4 месяца назад

    Small question, How do you get the lint suggestions on the same line as the code (in red)? I have to hover my mouse over the squiggly lines but I really like the way yours is shown.

    • @TrevorSullivan
      @TrevorSullivan  4 месяца назад +1

      I think that's from an extension called Error Lens. I agree it's really nice to see it on the same line!

  • @ricardonogueira2213
    @ricardonogueira2213 6 месяцев назад

    Nice content.
    Just would like to point out that signed ints don't have a bit to mark the sign. They are just interpreted differently.
    The number range is interpreted differently but both signed and unsigned (i8 and u8) have 256 possible values.

    • @TrevorSullivan
      @TrevorSullivan  6 месяцев назад +1

      Oops, duh. That was a dumb mistake. Thanks for pointing that out

  • @RadicalInteger
    @RadicalInteger 3 месяца назад

    this was a great tutorial

  • @smartwashington1455
    @smartwashington1455 9 месяцев назад +1

    ❤ wonderful

  • @yotubecreators47
    @yotubecreators47 Год назад

    Super helpful! thank you

  • @pranithreddy
    @pranithreddy 3 месяца назад +1

    How is your code getting auto compelete any free tool.

    • @TrevorSullivan
      @TrevorSullivan  3 месяца назад +1

      Yes check out my first video on Rust, where we talk about the Rust Analyzer extension for VSCode!

  • @ashisharya65
    @ashisharya65 Год назад

    Hi @TrevorSullivan,
    Great Video. Could you please let us know the features which has made you to learn Rust programming language.

    • @TrevorSullivan
      @TrevorSullivan  Год назад

      Hello Ashish! Thank you for your kind comment. Rust is a lower level compiled language that offers much higher performance than interpreted scripting languages.

  • @simonkalu
    @simonkalu 6 месяцев назад

    Awesome...

  • @falkenxx
    @falkenxx 5 месяцев назад

    My version of rust-analyzer (latest as of this posting) does not show the red highlighted error text snippet, I have to roll over the error zone to get a popup with the error. How did you configure yours to do the red error text snippet overlay?

    • @TrevorSullivan
      @TrevorSullivan  5 месяцев назад +2

      Good question! I just had to look that up myself. I have the Error Lens extension installed. Apparently that is what enables that functionality, showing the error text on the line!

  • @movieland8513
    @movieland8513 11 месяцев назад

    what is the theme vs?

    • @TrevorSullivan
      @TrevorSullivan  11 месяцев назад

      It's called Outrun in the extension marketplace!

  • @drac8854
    @drac8854 10 месяцев назад

    10:45 by using "as" does it convert value of x to u8 or it just takes the u8 part of x and subtract 5 from it and asgine it to y?

    • @Hellbending
      @Hellbending 8 месяцев назад +2

      It is a type conversion that’s handled at compile time when being changed to assembly/byte code.
      There is no direct number of ‘5’ in binary, its 0101.
      Sizing of digits (unsigned or otherwise) are only relevant to the compiler to know how many “slots” the digit has access to/can take up.
      Take 8 slots for instance, it can only store 255 as a maximum cos there literally no other space for digits in a register that large/small
      (11111111) for instance.
      If you want to go higher you either need more slots, or you cause ‘buffer overflow’ which means it wraps around and is why in some games if you say… hack your money or it bugs out you end up with negative money. Because the value went over whatever the maximum was and went from a positive integer to a negative one due to overflowing and wrapping around.