The Rust language: memory, ownership and lifetimes [linux.conf.au 2014]

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

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

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

    33:42, Morpheus is calling

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

    this is why rust feels like different

  • @uidx-bob
    @uidx-bob 3 ปีที่แล้ว +1

    The really smart people know how to show complex things in a simple way. This is a great example of that.

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

    There are many great intro videos about Rust. This is one of my favorites. Straight to the point of what makes Rust unique.

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

    I love the slide in the thumbnail... it's got a real "retro" feel to it.

  • @ibnukamy
    @ibnukamy 10 ปีที่แล้ว +4

    This presentation is really good. Thank you for sharing.

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

    The presentation flickers badly on the overhead screen.

    • @trissylegs
      @trissylegs 10 ปีที่แล้ว +9

      I'm guessing US/Japanese camera against PAL screen. (50 Hz vs 60 Hz)
      Talk is in Australia which is all Pal.

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

    4:55, not a hashmap but a treemap. to use a hashmap in C++ use unordered_map. but still a really really great talk

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

    really good!

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

    What happened to "optional GC" idea?

  • @Uni-Coder
    @Uni-Coder 9 ปีที่แล้ว +4

    ... and nothing about lifetimes?

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

      +mrbus2007 He talked about lifetime in detail

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

    The unsafe keyword is the ultimate refutation of Rust being a language that gives you "control" like C/C++. In order to do some things at the lower-level you simply need the ability to do unsafe things.

    • @batmansmk
      @batmansmk 4 ปีที่แล้ว +11

      I had the same intuition as you at first, luckily for us developers it doesn't apply in practice; Rust stays on top of its game in performance in most benchmark (around +/-2% from C) and feels safer overall. Major libs (tokio, serde) have around 10% of unsafe LoC. Even less when you built on top. Pretty cool, isn't it?

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

      @@batmansmk With the productivity that is higher than C&C++ and touches almost C# and Java.

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

      Yes, and that's the reason there is the unsafe keyword in Rust.
      But what you're not understanding is that unsafe is used very seldomly. Most crates have not one unsafe block, and even the ones that do, it's always wrapped in a safe abstraction

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

      You don't need to do unsafe things. In certain circumstances you may need to do things that the compiler can't prove to be safe - and if you do, you have to mark those passages with the unsafe keyword. Sure, at that point you're basically at C/C++ level - except that there's a clearly delimited scope of where extra caution is required - in an overall structure that's probably a lot easier to reason about than any C/C++ program of similar complexity.