4 ms·
Most of those languages have some kind of hierarchy. Lab view can define sub-components, TouchDevelop is basically procedural, excel has sub-sheets. Kodu is not
by seanmcdirmid 12y ago
Most of those languages have some kind of hierarchy. Lab view can define sub-components, TouchDevelop is basically procedural, excel has sub-sheets. Kodu is not hierarchical, but neither is it really a full language and the Brooks' subsumption architecture it is based is hierarchical (check out [1] on how to make Kodu hierarchical).
[1] http://research.microsoft.com/pubs/179364/p61-mcdirmid.pdf http://research.microsoft.com/pubs/179364/p61-mcdirmid.pdf
- chipsy 12y agoAre sub-components and sub-sheets an argument for _hierarchy_, or for reuse of symbols? I think it's the latter.
- seanmcdirmid 12y agoAs far as abstractions go, they are hierarchical. Actually, abstraction is all about breaking up and managing complexity into separate parts, and one would do pretty poorly without any hierarchy in their code. Even Kodu is hierarchical to a limited degree since each bot is programmed separately, but its not unlimited as in the other examples listed (which I would argue, is necessary to be considered hierarchical).
- chipsy 12y agoOP's premise wasn't that "hierarchy exists", but that it's "the correct organization of data." Now you are just glibly pointing out that everything can be structured as a hierarchy. That does not make the case.
- seanmcdirmid 12y agoI'm not pointing out that everything can be structured in a hierarchy, I'm pointing out that everything needs to be structured in a hierarchy at some point to deal with complexity; these are very different observations.
- jamii 12y agoMost of them don't use hierarchical data models, which is what we were discussing (I think?). Excel has one level of nesting (sheet.cell). Labview is a graph where components are grouped for reuse/abstraction. Access is relational(ish). TouchDevelop and Scratch are more traditionally hierarchical, with control-flow stacks and directed object graphs. I certainly wouldn't call Excel or Access 'inherently hierarchical'. Neither do I see the connection between 'visual languages' and 'inherently hierarchical' languages. If anything, the majority of visual languages I can think allow placing arbitrary computation at any point between arbitrary data sources/sinks. Where hierarchy exists it is usually fairly flat and used for organisation or code reuse. Arbitrary data-flow between any level or branch of the hierarchy is also a common feature.
- dragonwriter 12y ago> Excel has one level of nesting (sheet.cell). Excel has one level of nesting within a file, but Excel "programs" are not limited to a single file; and, in fact, Excel has features designed specifically for programs that require multiple files to be open at once to interact. Its true that each level of nesting in Excel is different in kind so that Excel doesn't support arbitrary nesting of namespaces, and that different bits of Excel functionality support different degrees of nesting.
- seanmcdirmid 12y agoAh, I see. LabView supports objects, so its data model can at least be hierarchical there. But even if we ignore OO data models, I think even FRP (as pure data flow as we get) is hierarchical since components (and sub-components) can still encapsulate state. The only thing you really lose are aliases/implicit communication channels. Most visual data-flow languages follow this style. I would argue that relational is also effectively hierarchical if not intrinsically: even without nested tables you always have IDs tacked on in a column that refers to rows in other tables. And once you start doing that, well...object graph.
- jamii 12y ago> I think even FRP (as pure data flow as we get) is hierarchical since components (and sub-components) can still encapsulate state. That's an interesting point. We explicitly avoid encapsulating state in that way, preferring views to interfaces. > I would argue that relational is also effectively hierarchical ... object graph. A graph is fine. The difference from a typical OO hierarchy is we get to start wherever we want in the graph and we can easily insert new edges anywhere in the graph, or hyperedges that relate multiple entities. It's not like a filesystem where you have to decide which property of the file is most important and gets to be at the top of the hierarchy.
- dragonwriter 12y ago> excel has sub-sheets It has sheets, but not subsheets (which are a feature of some other spreadsheet programs that you can find lots of questions online about how to do or fake in Excel; that being said, its still heirarchical, both in its structure and the visual metaphor for interacting with it.)