Hacker News new | ask | show | jobs
by cl3misch 106 days ago
Is this being downvoted because of the tone, or because state machines are unpopular/inappropriate in this case?

Genuine question, because this feels like a sensible solution to the problem as stated in the article.

1 comments

It made no reference to the 'shared' in 'shared state'.

No mention of asynchrony, multithreading, or the race condition that TFA encountered.

The “attempt 2” was literally a state machine implementation which the author rejected because they didn’t know how to do it properly and so did it badly using a bunch of if then else logic.