←back to thread

115 points goless | 4 comments | | HN request time: 0.612s | source
1. astahlx ◴[] No.44352814[source]
How would you compare it to Rust Type States, for example: https://cliffle.com/blog/rust-typestate/ ?
replies(2): >>44352978 #>>44353494 #
2. goless ◴[] No.44352978[source]
I need some time to get to this library.
replies(1): >>44353662 #
3. rapnie ◴[] No.44353494[source]
Thanks for that link. I submitted it separately, who knows it makes front page.

https://news.ycombinator.com/item?id=44353478

4. goless ◴[] No.44353662[source]
Sorry, I am not familiar with Rust. Although I try hard to understand this library, I cannot say that I understand it.

I have two questions here:

1. How to express uncertain state in type. In my example, it is implemented by union (enum) + Witness https://github.com/sdzx-1/polystate-examples/blob/fecaffb5b7...

2. I don't seem to see the possibility of combining state machines