When to (not) use typestate

When to (not) use typestate

Speaker: Matthias Farnbauer-Schmidt

Description

Sometimes Rust feels like magic when writing. It is often the case that this is because of typestate. A pattern where the state of a resource is embedded into a program’s types, making it hard for developers to write wrong code.

Rust’s type system, borrowing rules and ownership model make typestate a viable option and the pattern works better than in other mainstream programming languages. However, due to the unique and extensive way typestate is used in Rust new rustaceans often do not understand the pattern or use it in a wrong way.

Therefore, I will present and discuss typestate in my talk. The agenda will roughly be like this:

Track

Technology & Community

Level

Intermediate