3 ms·
I can't speak for the developers, but I don't think it's so much that they don't like state machines, more that complex state machines make it hard to reason ab
by throwawayocamlx 8y ago
I can't speak for the developers, but I don't think it's so much that they don't like state machines, more that complex state machines make it hard to reason about the protocol, and it seems really hard in practice to get many people to independently implement complex state machines uniformly.
RNG state is another usually non-deterministic input, but you are correct. This implementation takes time as input, and allows the manual passing of RNG state, but defaults to maintaining internal RNG state to make it halfway-nice to actually use. There's a trade-off between maintaining purity, and the complexity you impose on the users of the API. I think they made a good call in this case.