New Rustacean

e002: Something borrowed, something… moved?


Listen Later

Something borrowed, something… moved? * Date: October 12, 2015 * Subject: The struct data type constructor, and the basics of Rust’s “ownership” concept and “borrowing” and “moving”. * Audio: * M4A * MP3 * Ogg Follow/Support * New Rustacean: * Twitter: @newrustacean * App.net: @newrustacean * Patreon * Email: [email protected] * Chris Krycho * Twitter: @chriskrycho * App.net: @chriskrycho Notes Today’s episode discusses, and the associated source code demonstrates, a few basic behaviors of structs… including borrowing! After taking a short look at one of Rust’s basic approaches to creating new types, we dive into a fairly thorough overview of how borrowing works in fairly run-of-the-mill Rust code. This is a basic introduction, and as such I’m not getting into things like heap-allocated memory (Box) or dealing with move semantics with threads or closures. (I haven’t actually figured those out well enough yet to write something like this for them!) As usual, you’ll want to have the src open to see what I’m doing with the components documented below. Links * rustfmt – a tool for formatting Rust code * repo * “rustfmt-ing Rust` * Reddit discussion * RFC for incremental compilation * Text of the RFC * GitHub pull request
...more
View all episodesView all episodes
Download on the App Store

New RustaceanBy Chris Krycho

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

81 ratings


More shows like New Rustacean

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

292 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

Practical AI by Practical AI LLC

Practical AI

213 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

141 Listeners