Closed wolfadex closed 1 week ago
I've definitely given this some thought!
I generally start from the position of "Suppose we didn't have to have textual source files. What benefits could that unlock?"
Some things come to mind:
I don't think it's right to seriously consider alternatives to traditional textual source files until significantly later than the language's initial public release. Some reasons:
It's possible to consider a "middle ground" approach where we have a traditional textual source file format, but with additional annotations that aren't intended for human consumption.
There's already a precedent for that in documentation comments, and we could potentially take it further...but I'd want to be careful not to overdo it and risk ending up with a "worst of both worlds" scenario, where they're textual source files but they're so bloated with annotations and metadata, they no longer work very well with existing version control tooling. 😄
I could see recording transformations/edits being very valuable for a smart code assistant. I think it's very difficult for current machine learning models to create a working block of code in one go. It seems a lot more tractable to perform a chain of edits.
The model could learn how to fix common errors based on shared patterns in the recorded edits of github repos that previously encountered those errors. Definitely future stuff but interesting to think about :slightly_smiling_face:.
As I think about the ambitions for the editor, and trying to think of what can be done with the idea of
I've wondered what that means for the source file. As an example, traditional source code is treated first and foremost as plain text and then the editor is responsible for parsing through that plain text and creating meaning. Is there anything we can learn or borrow from non-plain text tooling, such as MS Word or Google Docs? An example from those being their comments exist parallel to the readable text, and are accessible as a panel displayed to the side of the readable text. What changes are required to be made to the source file in order to achieve this? Is this desirable? What are the costs?
Not sure this is worth it, but I figured it's worth thinking about considering the ambition.