[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/attac...
[2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-...
As nothing more than a random guess, I believe a lisp could be appropriate here. Highly flexible syntax means it's easy to make a custom way to input code that works for a phone (you could imagine that touching a form makes a dialog appear or something like that. I'm terrible at UIs), and homoiconicity helps reconciling the input UI and code as it's written.
Plus, lisps are fun! :)
Fructure might be nice on a phone! Currently makes heavy use of keyboard shortcuts but I bet it could be adapted to a touchscreen.
The problem comes when introducing names. Those are pretty independent from the language itself, apart from some basic length and character set constraints. But if you have something where you don't need that many variables (point free code, stack-based PL), you don't have to go to full keyboard mode that often, and completion would have to work with fewer possibilities, too.
But in the end people manage to type pretty well on screens, as long as you don't have to switch layouts. Which brings us a constraint like many early programming languages had, where you really couldn't depend on anything but alphanumeric characters on a keyboard. That brought us Algol, Fortran and C trigraphs. Now ditch parens and you're good to go, although I guess that displaying a single additional line on your OSK with the necessary few items is easy enough.
Now, the editing environment is interesting. Fewer widgets to display on screen and more awkward shortcuts. This could point towards something like vi, or maybe even Oberon/acme, with touch gestures taking the place of mouse button chords.
In fact I may already have started working on this :-)
Somewhat akin to the “railway” syntax diagrams used in older programming manuals (still used in the SQLite manual).
I sometimes imagine code as puzzle pieces you can -edit-
I'd be cool to make a GUI for programming valid code with drag and drop.
https://github.com/wcchoi/swell.sh
It is better than using the phone's keyboard but the limited screen estate is definitely a problem
Why would you want to code on mobile though? For serious development a nice desk is also beneficial.
Until the iPhone 6+ I'd have said coding on a phone was really awkward, but nowadays on the modern large format phones it's quite workable.
I guess something with as little punctuation as possible, so that you wouldn't need that many keys. A good autocomplete would probably be essential too. Would text still be the prefered input method? Is there something better suited to touchscreen input?
What about code display? I guess the "lots of little functions" style, which would probably allow for the easiest navigation on a tiny screen. Maybe collapsable/expandable function sections, like in WorkFlowy?