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

> Developers say they want "visual programming", which makes you think "oh, let's replace if and for". But nobody ever made a flow chart to read for (i in 0..10) if even?(i) print(i).

I'm not convinced by this particular example. Wouldn't a visual programming language just represent the logic here as a pipeline connecting two more atomic operations: you'd have a visual representation where you pipe the (0..10) range through a function that filters for even values, and then pipe the result to a print function.



I do not think what they say is that it is hard to visualise it, but that it does not offer much utility to do so. A "for" loop like that is not that complicated to understand and visualising it externally does not offer much. The examples the article gives is about more abstract and general overviews of higher level aspects of a codebase or system. Or to explain some concept that may be less intuitive or complicated. In general less about trying to be formal and rigorous, and more about being explanatory and auxiliary to the code itself.


That's a good point. Functional programming is a much more appropriate foundation for visual coding. Not only because of functional operators in your example, but immutability and purity also makes things simpler when represented visually.

Circuit modeling (like in Max/MSP, Reaktor, Pd) is something that also works way better visually than imperative programming.


Dataflow paradigm


It is certainly possible and that is how most of these visual languages do it. But is that how _you_ want to program that logic?


That’s how Smalltalk does it. I believe Scheme family languages do it that way, use a generator and then filter and select. Self as well.


Or just a good visualization for list comprehension.




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

Search: