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

Matthias Endler

๐Ÿ‘ค Speaker
692 total appearances

Appearances Over Time

Podcast Appearances

Rust in Production
Gama Space with Sebastian Scholz

A lot of people might be curious about, you know, exactly this process of working for quote-unquote a space company.

Rust in Production
Gama Space with Sebastian Scholz

Couldn't you also use a type state pattern for that?

Rust in Production
Gama Space with Sebastian Scholz

Yeah, I never heard about that types with keys pattern, the token pattern that you described.

Rust in Production
Gama Space with Sebastian Scholz

Is that a thing that you invented or does it come from any other project specifically?

Rust in Production
Gama Space with Sebastian Scholz

Now I understand part about loosely coupled components as well, because I'm not sure, but I guess Embassy used the type state pattern and a lot of generics for the pins before.

Rust in Production
Gama Space with Sebastian Scholz

I'm not sure if they dialed it down a bit or dialed it back, because...

Rust in Production
Gama Space with Sebastian Scholz

you sometimes want to repurpose pins.

Rust in Production
Gama Space with Sebastian Scholz

And if you set up your system once, it's not as flexible as if you were to be able to change that dynamically, sort of.

Rust in Production
Gama Space with Sebastian Scholz

And at the same time, you just use the normal ownership rules in Rust to enforce the same behavior.

Rust in Production
Gama Space with Sebastian Scholz

So you can still encode it in the type system without really having a lot of

Rust in Production
Gama Space with Sebastian Scholz

overhead and a lot of complexity on the type system level.

Rust in Production
Gama Space with Sebastian Scholz

Because that's sort of the only place where you can get that token from.

Rust in Production
Gama Space with Sebastian Scholz

That's pretty impressive.

Rust in Production
Gama Space with Sebastian Scholz

At the risk of going a bit meta here...

Rust in Production
Gama Space with Sebastian Scholz

How do you come up with these patterns?

Rust in Production
Gama Space with Sebastian Scholz

Do you find them online in certain other crates or do you think really hard about those problems and then start to encode those invariants?

Rust in Production
Gama Space with Sebastian Scholz

It's not really discoverable.

Rust in Production
Gama Space with Sebastian Scholz

Yeah, invest.

Rust in Production
Gama Space with Sebastian Scholz

Do you write down those correctness guidelines somewhere?

Rust in Production
Gama Space with Sebastian Scholz

Well, I guess you review a lot of Rust code nowadays, a lot of Rust code that should or cannot fail.