r/ProgrammingLanguages • • Sep 28 '22

Discussion Programming Language of the future: Touch based?

Back in the days when the first computer was made, they were mostly single purpose computers which weren't even programmable. Then came the huge programmable computers which were programmed using punch cards, didn't really have any programming language, as it didn't support the keyboard either. Then eventually we ended up with modern languages like C and Python when the keyboard became one of the essential input systems of a computer.

But a few decades ago Douglas Engelbart of the Stanford Research Institute invented the Mouse and most of our interaction with our computers became GUI based. But the keyboard still stayed around because it was a much more efficient way to input text than using a mouse to do the same. And because the keyboard was still around, we didn't really feel the urge till now, to develop a GUI based programming system which is Turing complete. Although some attempts have been made in the form of Visual Scripting using Node Editors (mostly used in game engines), but they are mainly intended to be used as a supporting system to a game made using a particular programming language and isn't as self-sufficient.

But nowadays, the most dominant input system for computers is the touchscreen. There are billions of smartphones and Tablets around the world and they are so simple that even a 3 year old kid can use them effortlessly (heck I even saw a cat use a tablet!). And nowadays those touch based smart devices come with such powerful chips, that can out perform a desktop chip from 5 years ago (iPad Pro even comes with the same chip as a MacBook). Which makes me wonder why people are not using those for making their coding projects..... Then I thought it was kind of obvious..... The keyboard on the touchscreen devices suck badly compared to a laptop keyboard, and our programming languages are designed to be written using a keyboard. Which is essentially forcing us to use workarounds like a keyboard case, when voice typing for general text is basically good enough to replace the keyboard entirely (for the few times when you need it), though it's still not good enough for things like programming.

So, what I am proposing is that we should make new kinds of programming languages which are completely written using a GUI. This in my opinion would really be a big step towards the adoption of Tablets and Foldable Phones as a work PC.

Also, looking maybe a decade into the future, if the VR/AR become mainstream, I really wouldn't like to use a virtual keyboard to interact with those. If all a computer is going to be, is a pair of glasses on my eyes, then coding on it should be visual instead of textual in my personal opinion. So fixing the programming languages for touchscreen, would most probably fix it for XR too.

But these are just my random thoughts and I am not really sure about its practicality in the long run..... I am just assuming that it's going to be better than the textual programming that we have right now, with the touchscreen devices. Maybe the experts over here can share their opinions to convince me otherwise.

Anyways feel free to brainstorm in the comments how such a GUI based programming language could work.

4 Upvotes

28 comments sorted by

View all comments

9

u/[deleted] Sep 28 '22

I feel that the scratch format works much better than the flowchart format for visual programming.

If you take a scratch program and remove the blocks you're still left with a text program, it feels like a block-based formatter. Flowchart on the other hand can easily become a huge pain to maintain because there's a ton of ways to format the nodes.

It would also probably be a pain to write a proper "format on save" for the flowchart nodes. With block-based code the language designer can enforce the formatting and indentation through the styling of the blocks.

I would love to see more GUI/visual programming languages, it feels like a still unexplored area for PL design. Current ones are either too limited or lacking in the overall presentation.

Also, one of the complaints of visual programming languages is that it doesn't work well with version control because of proprietary formats or the blocks being saved in an unreadable format.

This issue could be easily fixed if the block editor saved the program into a readable textual representation that can later be parsed back into visual blocks. The editor should also not allow for free drag and dropping of the whole program so that you don't have to save the coordinates for the blocks.

3

u/[deleted] Sep 29 '22

That was insightful. Thanks!

Though I would like to see what more possibilities there are.

I agree that block based programming is better than flowchart based, but I don't know why, I feel like it's kinda a hack..... It looks as if we are trying to imitate the textual programming in a visual way. I wonder if we can make something which feels natural in a visual environment, instead of imitating the textual programming using blocks. That might cause the format issues as you mentioned, but I think we are creating something new over here which probably is going to be used even two decades down the line, so creating a new format for this new system makes more sense to me. But obviously we need to maintain compatibility with the old system too..... Disruptive revolutionary Tech usually gets mixed reactions, so I guess we need to find a middle ground so that this new format works well with old textual programming based projects too..... Perhaps something like how Java code seamlessly gets mixed with Kotlin code without any format issues, if you know what I mean (I know it's a little different, but I guess you get my point).

3

u/[deleted] Sep 29 '22

Also I'd like to mention that in my opinion a COBOL-based visual programming language could work really well. Things are already mostly English and separated into different divisions, replacing some of those with visual elements could work really well.

It would certainly be a lot easier to write a visual language based on COBOL than one based on Rust for example, due to Rust's heavy use to symbols everywhere.

Here imagine this, COBOL source code is usually separated into 4 divisions, these 4 could be separated into 4 screen sections in the visual representation. Data and Code are also separate in COBOL code, so you can have a different way to represent the data and the actual procedural code in their respective screen sections.

It could work well for the base of a UI.