4 ms·
Flowchart normal form. Neat really. Makes me want to play around with a Smalltalk dialect. My least favorite thing about all the common programming languages i
by User23 3y ago
Flowchart normal form. Neat really. Makes me want to play around with a Smalltalk dialect.
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.
[1] https://en.m.wikipedia.org/wiki/Existential_graph https://en.m.wikipedia.org/wiki/Existential_graph
- usrbinbash 3y agoGood for flowcharts, less so for programming. > 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.
- marssaxman 3y agoPrograms are represented as one-dimensional byte arrays while they are being executed, too, as are all other data structures stored in an address space. I don't see why complex data structures flattened into a linear space via syntax structures should be any less legitimate than complex data structures flattened into a linear address space via pointers.