Matthias Endler
๐ค SpeakerAppearances Over Time
Podcast Appearances
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.
I'm not sure if they dialed it down a bit or dialed it back, because...
you sometimes want to repurpose pins.
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.
And at the same time, you just use the normal ownership rules in Rust to enforce the same behavior.
So you can still encode it in the type system without really having a lot of
overhead and a lot of complexity on the type system level.
Because that's sort of the only place where you can get that token from.
That's pretty impressive.
At the risk of going a bit meta here...
How do you come up with these patterns?
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?
It's not really discoverable.
Do you write down those correctness guidelines somewhere?
Well, I guess you review a lot of Rust code nowadays, a lot of Rust code that should or cannot fail.
How do you review Rust code for correctness?
What do you look out for?
What are some common patterns that you found useful here?
It turns out there's not a lot of space in space.