Modeling Finite State Machines with Rust
CRANK

A core concept in Rust is the ownership rule that "governs how a Rust program manages memory". This distinctive feature in Rust allows it to obviate the need for an automatic garbage collector (GC), support fearless concurrency, and enable its use in low-resource environments. While avoiding the need for GC is immediately apparent, it also allows expressing more constraints that can be enforced at compile-time. Therefore, even languages that use GC for memory management such as Haskell and Scala may implement a similar concept in the future (Haskell linear type proposal, Scala's Capabilities for Uniqueness and Borrowing). In the same vein, languages such as Dahlia use the same concept to model hardware constraints to express FPGA designs.

ramnivas.com
Related Topics: Rust
1 comments
  • 有限状態機械をモデリングする話。他の静的型付き言語でも同様のことはできるけど、Rustの場合は所有権があるので状態が唯一であることを保証できる

    Modeling Finite State Machines with Rust | Ramnivas Laddad
    ramnivas.com/blog/2022/05/0…