The exciting possibility isn't switching Python/Lisp/Java syntax (most people will pick one and stick with it), but being able to add language features and see your program immediately get more concise.
For example, Javascript added `bar${foo}`, but my code still has lots of 'bar' + foo. It'd be sweet to just click a checkbox and see my code get smaller on screen, without changing the underlying source code.
So what I really want is an editor that takes verbose languages and collapses common idioms into concise syntax.
This is called 'projectional editing', an idea that to my knowledge goes back to the 60s.
A projectional editor shows you both the original source code, and alternate representations (or, 'projections') of it. Given the right plugins and config, these alternate projections could happen to be more intuitive to grasp/edit than the original source code. One plugin could, for example, remove all the unnecessary semicolons. Another, could remove all the unnecessary punctuations and project the code in an indentation-significant way or vice-versa. Your idea to replace all the `'bar' + foo`s with ``bar{foo}``s would also be possible.
It's easy to imagine much more advanced use-cases. A sufficiently advanced editor could detect calls to FRP libraries, and project the data flow as a visual graph (picture all the `flatMaps()` and `scanLatest()s` as nodes on that graph). Or, given access to compile-time type info (via a typescript-style language-server), it could overlay the type of a value with the missing fields being shown as slots to be filled.
I can imagine such an editor to mostly "obsolete" the idea of a single syntax for each language in the first place. Like the language but not the syntax? Roll your own syntax! Just configure your own editor plugins. No one would have to know. No one would have to agree with your "taste." Not even your git repo [0]. (See /r/nosyntax/ for more ideas)
A projectional editor can also be implemented in the runtime, ala Smalltalk. In that case, the language itself is designed from the bottom up to accommodate such DX and opens many more possibilities.
A Clojure Conj talk called "... forgotten Lisp UX" explores the history of this idea in the context of lisp [1]. The author is also on Patreon doing exciting things in this field (https://www.patreon.com/shaunlebron).
---
[0] the editor may store some metadata next to the code that'd be committed to the repo, but the code itself would still be saved in the original syntax.
[1] Inspiring a future Clojure editor with forgotten Lisp UX - Shaun Lebron https://www.youtube.com/watch?v=K0Tsa3smr1w
I have long wanted this for symbol names. When I'm in the zone, I want to write/edit very short names for all kinds of symbolic names. But I want this to be a view, and the underlying code to remain verbose names for later reading. I once set out to create a VSCode plugin for this, only to discover it was not possible to automate the Symbol Rename feature. You can do it with regex find/replace, but it would be much stronger if you could use the compiler to do it.
Those sorts of general syntactic sugars are something we've put a lot of work into. (Currently if statements, for loops, for comprehensions, ternary operations, etc are all just sugar and don't affect the underlying source.) We also plan to expose the underlying format on the platform and let users write their own transforms. So people can invent and share their own intuitive or concise representations and have them applied everywhere immediately (and also shared with other users).
> Also, parsing and generating N languages is a really, really hard problem.
Really, it is not a hard problem with the right tools. Haskell, for example, is extremely good at parsing and generating (maybe that's the only thing that is is #1 in, but it is miles beyond any other language I have used...). An example of this is pandoc https://pandoc.org/
Haskell has ways of expressing that sort of logic well, but you still need to write, maintain, and test all of the code that abstracts all the languages. There will be a lot of demand for optimizations, customization points, support for importing third party packages, and so on. There's a huge gap between proof of concept and fully mature product in this space. You're basically talking about modelling all the compilers and interpreters with one product.
For example, Javascript added `bar${foo}`, but my code still has lots of 'bar' + foo. It'd be sweet to just click a checkbox and see my code get smaller on screen, without changing the underlying source code.
So what I really want is an editor that takes verbose languages and collapses common idioms into concise syntax.