Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Sebastian Scholz

๐Ÿ‘ค Speaker
485 total appearances

Appearances Over Time

Podcast Appearances

Rust in Production
Gama Space with Sebastian Scholz

Because unfortunately, it's still possible to screw up in Rust.

Rust in Production
Gama Space with Sebastian Scholz

Is it?

Rust in Production
Gama Space with Sebastian Scholz

So one of the main things in the beginning, I thought, ah, it's so cool.

Rust in Production
Gama Space with Sebastian Scholz

I can't get wrong with this.

Rust in Production
Gama Space with Sebastian Scholz

If my code compiles, it's perfect.

Rust in Production
Gama Space with Sebastian Scholz

And it's true in most of the cases, but some logic bugs can still sneak in.

Rust in Production
Gama Space with Sebastian Scholz

Mostly if you don't write your code in a way that prevents them, because that's one of the cool things about Rust and what we use extensively here as well.

Rust in Production
Gama Space with Sebastian Scholz

If you write your code using the strong type guarantees, you can make it so that any invariants that need to hold true, so any preconditions that your code has and that need to be true for it to work correctly, you can express that in the type system.

Rust in Production
Gama Space with Sebastian Scholz

Maybe not all of them, but most of them.

Rust in Production
Gama Space with Sebastian Scholz

And so, for example, we use that extensively for configuration.

Rust in Production
Gama Space with Sebastian Scholz

We have

Rust in Production
Gama Space with Sebastian Scholz

We have things, we have code that can only run once the hardware is initialized correctly.

Rust in Production
Gama Space with Sebastian Scholz

And so we pass around serial size tokens, types that can only get created in one place in the system.

Rust in Production
Gama Space with Sebastian Scholz

And that's after initialization of that specific hardware.

Rust in Production
Gama Space with Sebastian Scholz

And so we use, for example, this sort of a token in other places to prove, yes, this code will only ever run after initializing that specific hardware.

Rust in Production
Gama Space with Sebastian Scholz

Well, if you do that type state pattern, you kind of make code dependent.

Rust in Production
Gama Space with Sebastian Scholz

You encapsulate the code.

Rust in Production
Gama Space with Sebastian Scholz

Not encapsulate.

Rust in Production
Gama Space with Sebastian Scholz

You make it dependent on each other a lot more, I feel like.