Hacker News new | ask | show | jobs
by andrekandre 1544 days ago
typestates are great, but in rust i wonder if it would be more ergonomic and easier to get right if it was officially a feature instead of a pattern you have to implement...?
1 comments

Amazingly, typestates used to be a headline feature of Rust, in the very, very, very old days. Like, "Wow, Rust is the language that's going to make typestates mainstream!" was a thing people thought when seeing it.

Eventually it was removed. https://pcwalton.github.io/2012/12/26/typestate-is-dead.html

  > The reason was that “in practice, it found little use”
thats a real shame...