4 ms·
I don't think you are wrong about the DAGs, though in programming language parlance they are called abstract syntax trees (AST). Sure you can do like Scratch, w
by wrnr 6y ago
I don't think you are wrong about the DAGs, though in programming language parlance they are called abstract syntax trees (AST). Sure you can do like Scratch, which is basically an AST editor instead of a code editor. Not a bad idea in of itself, but what if you start writing those basic blocks in your language of choice? Keep looking up the function definition in your IDE and at some point you end at some assembly with long jumps all over the place.
The point I wanted to make was that no matter what design choice you make as a language author, to make this DAG/AST as palatable for the end user, be it with a imperative, functional, logic or concatenive style of programming, a price is aways payed, in terms of complexity at some level (time, space, ergonomics), no matter what you do.
- adrianN 6y agoI'm not thinking of the AST, but of a graph of https://en.wikipedia.org/wiki/Basic_block https://en.wikipedia.org/wiki/Basic_block
- gridlockd 6y agoYou didn't answer the question. ASTs are not DAGs, they are just trees. They also do not represent the computation, but the language syntax. Many visual programming languages are based around DAGs and they do represent the computation itself. The edges are usually not nodes either, so those DAGs are not hypergraphs.