I agree with
@Alex McLean that most VPLs don't use a "spatial syntax". So what are these VPLs visualizing then?
They are visually representing the
topological relationships between different parts of a program. Those relationships include containment, connection, adjacency, overlap, order, etc. Most node and wire VPLs make use of connection and possibly containment (e.g. a node can itself contain a set of nodes and wires). Scratch makes frequent use of adjacency, order, and containment. There is nothing inherently visual or spatial about these relationships, they are multi-modal and lossless to transform. A textual syntax that describes these relationships has tradeoffs when compared to a visual syntax, but I wouldn't say that either is inherently better. For example,
connection in textual languages
has to be a symbolic reference. There is no way to directly point to a function or variable besides referencing it's name. Symbolic references are genuinely helpful when it's easy to name the intent of a piece of memory or a set of instructions. The name becomes a bookmark that is easy to remember and others to learn. But naming can be overbearing at times, and describing connection/reference in a visually direct manner removes that need in until I have to repeatedly layout and organize these connections as a program grows. To Alex's point, spatial position in most VPLs doesn't have much importance to the computer executing the program, only of those authoring the program.
I'm excited to see more spatial canvases like excalidraw and tldraw start capturing these topological relationships in there underlying data structures as well as image recognition being able to do the same. It means that the ability to transfer a notation through different modalities or even bridging the physical to digital world is becoming easier.
It also brings up the questions of what a VPL looks like that requires spatiality? A language that depends on location and proximity and other geometric relationships that cant easily be represented in other modalities if at all.
Much of my framing is based around David Harel's paper "On Visual Formalisms" for anyone interested!
https://dl.acm.org/doi/pdf/10.1145/42411.42414