Kontakt

 

Rust

 

  • prefer https://lib.rs/ over crates.io
  • borrowing and ownership are TWO DIFFERENT THINGS. changing ownership means "move"; borrowing is just temporary.
  • lifetimes rarely needed (!!?)
  • install using rustup.
  • thinking using stack and heap is difficult sometimes.
  • Suggest: start just with plain functions, then add objects into it.
  • https://newrustacean.com/ is great, esp. https://newrustacean.com/show_notes/e005/index.html
  • Lifetimes / Borrows / ...
    • Read the chapters on lifetimes https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html and smart pointers https://doc.rust-lang.org/book/ch15-00-smart-pointers.html - read it again. :) 
    • https://doc.rust-lang.org/std/rc/index.html#examples
    • https://stevedonovan.github.io/rust-gentle-intro/readme.html awesome - esp. https://stevedonovan.github.io/rust-gentle-intro/2-structs-enums-lifetimes.html
  • various great URLs:
    • https://doc.rust-lang.org/std/convert/index.html
  • Great blogs
    • https://hermanradtke.com/archive.html
    • https://pitdicker.github.io/Interior-mutability-patterns/