|
|
|
|
|
by UncleMeat
2039 days ago
|
|
> Oh, but you actually do! You write your programs in form of trees (abstract syntax ones), and those trees generally represent directed and usually acyclic graphs of dependencies. Implicitly. This isn't actually represented graphically as a tree. You still have code in linear segments. You just know how to parse the text into its tree structure. The fact that code is actually parsed into an AST doesn't mean anything here. Pointing this out is just showing off. I'm happy to talk about programs as graphs (my PhD is in PL) but for the purposes of understanding how people write programs we write them as linear text. > And the reason we don't lay out programs as visual, interactive graphs[0] is because text is faster to work with using digital tools. Yes. And similarly, if you are publishing a recipe book the laying out text is easier than gantt charts. > [1] - Though structural editors exist; see e.g. Paredit mode for Emacs, which lets you do edit operations on the tree your code represents, moving and splicing branches around while ensuring the tree structure is never damaged. Yes we all know. There's been decades of research in this space. And basically nobody in real life uses them. |
|