3 ms·
> What if the input is the right type, but doesn't have the right count for the expression? That just means that your type system isn't powerful enough to talk
by yorwba 9y ago
> What if the input is the right type, but doesn't have the right count for the expression?
That just means that your type system isn't powerful enough to talk about counts. Of course most type system that can do this are probably too complex for untrained users. Maybe this could be mitigated by providing simple counterexamples for each type error. (Actually, if someone knows about research into understandable error messages for type systems, I'd appreciate a link.)
Alternatively, you could use a simpler type system to just narrow down possible connections (maybe highlight endpoints of the correct type when dragging) and leave the rest to be handled at runtime.
> Operations in the GUI might include things like selections, etc. In visual programming, you might convert that stream of application commands to a set of nodes. It's simple enough at first, but it turns out that things like selections -even selecting a row or two of data- are very, very tedious to do with a visual programming tool (when compared to just doing it in a GUI).
I think just having a node labeled with operations defined using a wizard would be a pretty poor use of visual programming. For data selection, I think the node should represent the data directly (e.g. when it's the content of a form, the node should look just like the form), and connections should be made directly to individual fields instead of requiring dedicated selection nodes.
To be sure, that won't work as easily for variable sized collections, and objects with lots of fields will clutter up the program; but you can always use the tedious way for those.
> When you write code, you might declare a variable. Then later on in the code, you refer to that variable. In a vertex-edge model, there needs to be a connection between the variable declaration and anywhere the variable is used.
There are ways to avoid that, e.g. by allowing multiple nodes for each variable (similar to ports in circuit diagrams) that can be placed closer to where the variable is used. That does mean you can't follow the connections from the variable to all usage sites, but is closer to the way textual programming works.
Disclaimer: I have almost no experience with visual programming, and I have been moving to using the keyboard for more stuff lately (i3 window manager, Vimium in Firefox, ...) so I'm almost certainly not in the target demographic for visual programming.
- biocomputation 9y agoYou have good comments. << To be sure, that won't work as easily for variable sized collections In another response here I discuss the problems with iterations and notions of algebraic closure. Your remarks about 'variable sized collections' are exactly the sorts of problems that arise when your data flow language can't/doesn't directly represent all the elements of computation. When that happens, things either 'leak out' of the data flow diagram, or they remain locked inside impenetrable abstractions. Both of these problems broadly underline a lot of the complaints that programmers have about visual programming tools/languages. Stated simply, the complaints are: "I can't declare a loop/recursion in this visual programming language. This sucks!" Or: "Implementing loops in visual programming sucks because I can implement the loop/recursion, but there's no debugger/stack so I can't inspect the loop/recursion at a particular iteration step/stack frame. This sucks!"
- DonaldFisk 9y agoThis is probably because particular visual languages were designed specifically for non-programmers, and programmers who use them find that features they take for granted in more mainstream languages are missing. In my language's IDE, you can set breakpoints or step through the code and inspect the contents of the the tagged value queues at the inputs of vertices.