Skip to content

Commit 027e81c

Browse files
committed
update project goal notes
1 parent 4ed587f commit 027e81c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Readme.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ import "github.com/Gurpartap/statemachine-go"
9292
>
9393
> [John Gall (1975)](https://en.wikipedia.org/wiki/John_Gall_(author)#Gall.27s_law)
9494
95-
Performance is a fairly significant factor when considering the use of
96-
a third party package. However, an API that I can actually code and design in
97-
my mind, ahead of using it, is just as important to me.
95+
StateMachine is simple in its specification, DSL, and internal implementation.
96+
And it works. There are no plans to introduce advanced FSM features such as
97+
regions, submachines, history based transitions, join, fork, etc., unless
98+
there's a simple way to do so without affecting the rest of the implementation.
99+
Well, submachines have already been implemented (partially and is in flux).
100+
101+
Performance is generally a significant factor when considering the use of a
102+
third party package. However, an API that I can actually code and design in my
103+
mind, ahead of using it, is just as important to me.
98104

99105
StateMachine's API design and developer productivity take precedence over
100106
its benchmark numbers (especially when compared to a bare metal switch
@@ -463,7 +469,7 @@ process.Machine.Build(func(m statemachine.MachineBuilder) {
463469
// log all transitions
464470
m.
465471
AfterTransition().
466-
ToAny().
472+
Any().
467473
Do(func(t statemachine.Transition) {
468474
log.Printf("State changed from '%s' to '%s'.\n", t.From(), t.To())
469475
})
@@ -582,7 +588,7 @@ m.BeforeTransition().From("idle").ToAny().Do(someFunc)
582588

583589
m.AroundTransition().From("state_x").ToAnyExcept("state_y").Do(someFunc)
584590

585-
m.AfterTransition().ToAny().Do(someFunc)
591+
m.AfterTransition().Any().Do(someFunc)
586592
// ...is same as:
587593
m.AfterTransition().FromAny().ToAny().Do(someFunc)
588594
```

0 commit comments

Comments
 (0)