Rust's Twin Strings: Understanding &str and String

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

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

  • @wepranaga
    @wepranaga 2 месяца назад +6

    I'd pay for course on rust if you create one. your videos are so good. love from indonesia 🇮🇩

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

      +1

    • @FloWoelki
      @FloWoelki  2 месяца назад +1

      Thank you for the lovely donation, and thank you for the feedback! So glad it helps you :)

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

    Your editing is awesome man it helps us to visualize greatly.
    I think you should do a rust and go course. I think it would be valuable experience. Not many people have the ability to break down complex topic into understandable chunk.
    I think having bytesize course (playlist) would give you more exposer.

  • @mohamedabd_elkhalk4235
    @mohamedabd_elkhalk4235 2 месяца назад +1

    Thank you so much for your Rust string types tutorial! It really helped me understand the concept of str being dynamically sized and the differences between &str and String. Your explanations made it easy to follow along, and I appreciate the effort you put into sharing this knowledge. Keep up the great work, and may i ask you what kind of text editor you use?

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

      Thank you so much for the feedback :) At the moment, I use the Zed editor.

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

    Thank you for the great explanation

    • @FloWoelki
      @FloWoelki  2 месяца назад +1

      Glad it was helpful! :)

  • @pranay380-o8q
    @pranay380-o8q 2 месяца назад

    Kindly make videos about rust sir share your all of your knowledge about rust

  • @sushantlokhande930
    @sushantlokhande930 10 дней назад

    Which IDE and plugins you are using for autocompleting?

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

    One thing to note, you can use += with mut String's but not &str's, mut or not. It doesn't make sense to me, and I feel it was the wrong direction for them to take the design, but I also don't think there are many languages which get strings correct. Another pain point, since strings are UTF-8 encoded, .len() doesn't report the correct number of characters in the string but instead reports the number of bytes, which is fine for allocation purposes, but nothing else. I don't know if anyone else would agree, but I think that strings should have been treated as first class objects and default to a string_view type of some kind. Of course, I also wouldn't design things around explicit borrowing and ownership rules, but I can't imagine any Rustacean will agree with that stance.