Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think programs are necessarily a hierarchy, though that is a useful way to look at them. There are definitely mutually recursive elements, though these are admittedly limited in size of scope. However, most of the problems with looking at programs as hierarchies come from forcing elements to have a single parent containing element. Instead of a tree, you get a lot more flexibility by allowing elements to have multiple parents (so it is still a DAG, but not a tree since a path from root to the element is not necessarily unique).


For humans, hierarchies are easier to think about and easier to format. But you're right: sometimes you really want to express your structure in a more general graph. And format it more graphically.

For me the most obvious examples are: state-machines and entity-rln diagrams (and, for example, showing how your C-structs point to each other and how you're using std containers and ownership).

Thanks for pointing out that what I really want is a way to create/edit a graph.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: