New Rustacean

e008: Just like something else


Listen Later

Notes In this episode we cover—at a _very_ high level—two more fundamental concepts in Rust programming: generics and traits. Generics gives us the abilitty to write types and functions which can be used with more than one type. Traits give us the ability to specify behavior which can be implemented for more than one type. The combination gives us powerful tools for higher-level programming constructs in Rust. Comments on source code Now that we have a handle on how tests work, we’ll use them to validate the behavior of our code going forward. This is great: we can show that the tests do what we think. To today’s point, though: we actually know even apart from whether the tests _run_ successfully that these generic functions and the associated traits are behaving as we want. Failure with generics is a _compile_-time error, not a runtime error. Sponsors - Chris Palmer - Derek Morr - Luca Schmid - Micael Bergeron - Ralph Giles (“rillian”) - reddraggone9 - William Roe Become a sponsor - Patreon/newrustacean - Venmo.com/chriskrycho - Dwolla.com/hub/chriskrycho - Cash.me/$chriskrycho Follow - New Rustacean: - Twitter: @newrustacean - App.net: @newrustacean - Email: [email protected] - Chris Krycho - Twitter: @chriskrycho - App.net: @chriskrycho
...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

290 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

215 Listeners

Practical AI by Practical AI LLC

Practical AI

204 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

141 Listeners