Hacker News new | past | comments | ask | show | jobs | submit login

What is text itself but a visual representation of something complex? I repeat, text is intrinsically visual and just a restrictive form of the alternative which is diagramming. Is it a pure coincidence that the english alphabet happens to be the best primitive for representing programming concepts?

I believe that there is no coincidence. English is horrible at representing programming concepts. A limited set of characters, restricted left to right reading and line based structures... is this really the best way to program? Intuitively, things like recursion, data structures, processes, modularity and objects etc, etc, are better represented with diagrams... Wouldn't Circles and lines that can move diagonally across the 2D plane be better candidates as programming primitives?

It's hard to say really. Functional programming is in itself a restrictive form of imperative programming that gains power through restriction. It may very well be that English as a programming primitive gains the same type of power through restriction as well. Our brains have dedicated modules for processing language as well as dedicated modules for processing geometry, shapes and diagrams. Which module is better for programming?

Let's face it though, English as a programming primitive only became prevalent for historical reasons similar to how javascript (a shitty, shitty language) became prevalent. We like it partly because we're used to it.

There has got to be a better way.




What's funny is when we program we use ASCII art (indentation, things like the fact that [ and ] cause symmetric "box" look) to help us. If text was really all we needed, writing minified JS directly would be ok. Given a keyboard and a mouse, this was the fastest way to create nested boxes (ASTs) that have non-tree links (names): type out a serialization of it that your fancy text editor automatically ASCII-artifies.


Math.

When learning graph theory it can be quite useful at first. But once you start using set theory the graphical representation actually hides more information than it gives and intuition starts to get in the way of us discovering useful properties.


IMO the graphical representation some times removes accidental complexity by not needing names or producing orderings. eg. To write a non-tree graph you always need to introduce local names unless you use something like SKI combinators. When proving the Kuratowski-Wagner theorem for example, I'm pretty sure the diagrams and the language-form help each other without either being strictly better.


I think this visual stuff is perfect for functional (math based) programming as composed expressions aren't easily readable as english.

I find language to be better suited for imperative procedures. Think about it, I have a list of tasks, do I write that list in ordered English bullet points or do I draw a diagram?


I find simple math to be much more elegant and easier to comprehend then a jumbled visual diagram. It's much easier to understand a universal quantification in a standard notation than reasoning by visual analogies.

Programming languages tend to be a little less expressive and elegant. They're more complicated too. For reasons of course... but I don't think I'm going to be writing algorithms and data-structures in such a tedious notation as a diagram.

Graphics are good for some things but programming I don't think is one of them.


Some things look best in text and it's fine. However, "programming" is a very broad category, and definitely does not boil down only to algorithms and data structures. I'd even say that most programming tasks in the world right now are much less about complex algorithms and much more about everyday systems plumbing. Sure, at some point you'll need to fire a complicated linear algebra kind of algorithm, but before you get there, you need to get the data out from some source, do some reformatting, decide which algorithms to run and when and then send the results somewhere else. And for that, seeing what is happening with your data the moment you try a solution, and deciding the next step based on immediate feedback is great.

This is pretty much why we've gone with interchangeable representations instead of going "visual only". The choice of the proper tools / representations highly depends on the context, and we want to leave that for the programmer's decision.


Are you familiar with category theory? I've been finding it very helpful for processing things visually. Considering this is "category oriented programming," I'm betting they find it helpful, too ;)


Actually diagram might be better suited, for example to display the difference between sequential in parallel tasks.




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

Search: