State Machines

by moodyharsh
state-machines

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 ?

  1. Game A.I
  2. Control Systems / Process modelling
  3. Network Protocols
  4. Languages
  5. VHDL/Verilog
  6. UI using Hierarchical state machines
  7. REST hypermedia
  8. Gesture detection/interaction
  9. Life cycle management
  10. Process synchronization
  11. Lockfree data structures
  12. 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.