In this tutorial we will see how to program a simple state machine using Mixins and message dispatching.
Let's just remember that a generic message in ELENA can be qualified.
"subj" is a subject class which qualifies the generic message "eval". In the expression "o::subj" we create a temporal mixin object (so called a temporal mutation). As a result "eval" message is turned into state0'eval and is sent to the instance of MyClass.
This principle will help us to create our simple state machine.
The key element is a message dispatching expression:
This code is equivalent to our mutation expression:
As a result we create a state machine without branching operators, using only ELENA dispatching routines.