https://blog.yoavlavi.com/state-machines-would-have-saved-the-roman-republic/
Typestates Would Have Saved the Roman Republic