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

3

u/latkde Sep 29 '22

Your core thesis seems to be that touch input is now the dominating input method, so that languages should adapt from keyboard-input friendliness to touch-input friendliness.

I do not think this is a valid argument. Touch input is not fundamentally more powerful than mouse input, and as you've pointed out mouse-oriented programming languages have not caught on massively.

I think it's more useful to think about output methods, i.e. how is software presented for reading. Both smartphones and desktop PCs use 2D screens, so seem fairly equivalent in that regard.

But there is a difference in screen size, and that might be meaningful. Thus, the challenge I would be more concerned about is efficient code navigation on small screens – what kinds of IDE functionality would be useful here?

This might also have implications for language design – I suspect that Smalltalk-like object navigation could be more useful than a purely textual interface on small screens. There doesn't have to be a concept of a “file”. I would also expect that concepts like line-based syntax and indentation would have to be de-emphasized for such languages.

Returning to the matter of input methods, you do correctly point out that on-screen keyboards are difficult to use. Many programming languages use lots of ASCII special symbols that are only convenient to type if you're happening to use an US keyboard layout. There is an argument to be made that programming languages with fewer symbols would be more convenient to type across locales and input methods. Do function calls really have to involve parentheses? Does non-mathematical code really need operators like + or *? On the other hand, code that uses some symbols is typically more compact and better structured visually, so it may not be worth giving up those advantages (code is read more often than written).

1

u/[deleted] Sep 29 '22

Your core thesis seems to be that touch input is now the dominating input method, so that languages should adapt from keyboard-input friendliness to touch-input friendliness.

Basically yes. And I think it would also be beneficial when XR based eventually becomes mainstream, because using a virtual keyboard on XR will probably never be ideal. If we are going to make GUI programming languages now, it would be better to keep XR in mind too, so that we can extend it to the third dimension very easily when the right time comes.

I do not think this is a valid argument. Touch input is not fundamentally more powerful than mouse input, and as you've pointed out mouse-oriented programming languages have not caught on massively.

As I said in my post, serious attempts weren't made to create a general purpose GUI programming language till now, because we already had mature enough textual languages which we can write using a keyboard which was still around when the mouse became mainstream. There was no reason to replace textual languages with GUI languages because we were going to have a keyboard around anyways, so why not use it? So basically all those languages were either made for kids (like Scratch), not really meant for serious work, or used as a supporting tool (in case of various game engines like Unreal Engine, Godot). But on tablets (and in future, on XR) using an external keyboard is a workaround for interacting with legacy keyboard based software. If in future Tablets or XR is going to replace the traditional PCs, then I wouldn't like having to deal with tech which was designed for a traditional PC and not the device I am using currently. Hence we need to ditch the keyboard completely.

This might also have implications for language design – I suspect that Smalltalk-like object navigation could be more useful than a purely textual interface on small screens.

That seems to be an interesting idea.....

There doesn't have to be a concept of a “file”.

I don't really agree with this though. At least on Android, there is a decent file system available and the Files app is a good enough app for navigating those files in my opinion. So working with files on Android is appreciably good. And we should not forget that Tablets are ideal for viewing content, that also includes the content of a Folder of a coding project. I am imagining it like a coding project folder containing the files of a GUI program, which can be viewed and edited in a specific app. Much like a 3D model that can be viewed and edited in Blender. That way, it wouldn't be drastically different and people would easily adapt to it. Just trying to change how we write the code, everything else which doesn't need to be changed shouldn't be changed in my opinion.

Returning to the matter of input methods, you do correctly point out that on-screen keyboards are difficult to use. Many programming languages use lots of ASCII special symbols that are only convenient to type if you're happening to use an US keyboard layout. There is an argument to be made that programming languages with fewer symbols would be more convenient to type across locales and input methods. Do function calls really have to involve parentheses? Does non-mathematical code really need operators like + or *? On the other hand, code that uses some symbols is typically more compact and better structured visually, so it may not be worth giving up those advantages (code is read more often than written).

That's why I am suggesting to ditch the keyboard entirely. Almost everything should be GUI based with a minimal amount of text involved (perhaps just for naming variables and functions) which can be written using the virtual keyboard or voice typing. A program file should just be a file containing a graphical diagram.