The biggest failure of language designers for the last 50 years is not producing a language with state machines. State machines are more central to programming that objects and functions.
Where are state machines used ?
- Game A.I
- Control Systems / Process modelling
- Network Protocols
- UI using Hierarchical state machines
- REST hypermedia
- Gesture detection/interaction
- Life cycle management
- Process synchronization
- Lockfree data structures
- Promises / Ajax
All enginering softwares use state machines like Matlab’s simulink. Isn’t it time software programmers also use them ? I found the syntax presented in this robotics language useful. Co-routines are also useful for implementing state machines. The next time you are stuck don’t use functions or objects, use co-routines.
70 years of Lisp hasn’t even delivered a spell checker and look the traffic lights continue to function.
Functions and objects are never going to be processes no matter how many “lambda papers” Guy Steele will write. Computer science is not a branch of mathematics. Computer science is the study of building processes. To make the process building reliable is the task of software engineering. Process is to computers what engine is the machines and state machines describe all processes.