While writing robotics programs, students experience quite a bit of difficulty with conventional procedural programming because of its weakness in handling or controlling reactivity that is a basic functional requirement for robotics control .
For reactive control, rule-based programming has an advantage over procedural programming .
Accordingly, the pairs of flowchart and Interactive C  for procedural programming, LD and Structured Text (ST)  for rule-based programming, and FSD and our State-Based Squeak for state-based programming were adopted.
The experimental group was given the state-based programming environment while the control group was given a conventional procedural programming environment.
That is, they learned sequencing and repetition in procedural programming through an educational programming language.
However, the control group used repeat structures and escaping repetition command "exit loop" according to the procedural programming system, while the experimental group used state scripts and the state transition command "transit to" according to the State-Based Squeak.
This study considered reactivity as an integral part of procedural programming, and developed State-Based Squeak to support robot programming.
For straight-line programs, programmers using state-based programming must divide the system into more units than is needed for procedural programming. This higher complexity is a disadvantage of state-based programming.
In the 1990s, procedural programming gave way to languages such as Smalltalk and Simula, which introduced the concept of objects.
Actually, even in procedural programming, not all procedure and variables are visible.
The main point is that, in procedural programming, the interaction of data and code is governed by implementation details, such as the source file in which a variable is defined.