|
|
|
|
|
by remram
1915 days ago
|
|
The problem is that this uses your new custom language which is not yet documented. I had seen this, I asked for alternatives because it doesn't seem to be an option yet. The examples in your README also seem very limited, with no guards/actions/recursion/parallelism (correct me if I'm wrong). The last two I can do without but it seems overly simplistic as of now. |
|
Agreed.
.
> with no guards
It's not entirely clear what you mean by a guard. Isn't the entirety of a state machine a guard?
If you mean transitions that are disallowed due to embedded mealy values, that's meant to be handled by the return value from hooks. That runs but isn't published yet because the test cases aren't yet adequate
.
> actions
or less glibly .> recursion
State machines don't have control behavior and in general should not have direct expression of "recursion," unless I misunderstand what you mean
If you mean machines self-embedding, that is planned, and I don't know of anyone else who does that
.
> parallelism
Nothing stops you from putting a machine in each of a bunch of threads or web workers or whatever. By example, if you were making a Roller Coaster Tycoon style game, having one FSM to model each park visitor or each ride or each garbage pile or whatever would actually be fairly reasonable.
Granted, I'd probably just make an array of them and process them serially in a single web worker, because you'd want the world synchronized and fast, but, it's doable.
The core concept of a finite state machine has no direct association with process control and within a single finite state machine it's not actually clear to me what parallelism would mean within a single FSM. I've never seen this in any other state machine library. If this is what you mean, I'd like to hear more, possibly including an example API.
It's possible that I misunderstand you.
.
> it seems overly simplistic as of now.
If you can find a finite state machine with more features, please let me know where.