Hacker News new | ask | show | jobs
by cbetti 3032 days ago
This idea of defining a hard error for a transition which makes no sense is a nice way to deal with the OPs problem. You must still explicitly handle the situation, but it minimizes the "unwind/undo" code.