by User23 · 3y ago · 0 comments
My least favorite thing about all the common programming languages is that programs are represented as one dimensional byte arrays. You can talk about ASTs and whatever else to your heart’s content, but at the end of the day you’re editing a one dimensional character/rune array. It’s especially sad since existential graphs[1] are well over a century old.
Maybe one day I’ll manage to invent a properly two dimensional m-expression that works with any s-expressions.
> My least favorite thing about all the common programming languages is that programs are represented as one dimensional byte arrays
The reason why graphical notations never took off in programming (and never will), is simple: It's all neat and shiny when we represent small algorithms or small example programs as flowcharts.
And then, as soon as the program grows to a sizeable project, that has to deal with state, external state, user defined state, represent a GUI, talk to another system, or does anything even slightly more complex than the examples or single algorithms, the whole thing goes to hell. Try to represent a webserver with 50 different endpoints as a graph. Try representing a single page application for a webshop, including error handling and different ways of discovery. You'll need ALOT of screenspace, and those are not even complex examples.
And then there is the problem of editing, storing, versioning, compiling and transmitting the programs. All these are solved problems with code, none of them are universally solved for graphs. Sure, we could just define a textual representation of the graphs, but then we're right back to the "byte arrays", just with one added layer of complexity.