3 ms·
One of the biggest problems is the flat one-dimensional aspect of text files. Overly-graphical solutions are clunky and not concise enough. However overly-flat
by borplk 9y ago
One of the biggest problems is the flat one-dimensional aspect of text files.
Overly-graphical solutions are clunky and not concise enough. However overly-flat environments like a plain text file also comes with huge problems.
What I have wanted forever is a smart environment that looks similar to a text editor but under the hood it's more of a structure editor (wayyy easier said than done).
Two main problems with text is,
1. parsing
2. inability to easily associate metadata with parts of the program without visual/syntax clutter
I'll expand on each point,
Parsing: parsing implies syntax and language structure and it causes inflexibility. the problem domain is infinite but we have only so many characters to work with. this creates some blessed first class concepts like "strings" and puts everything else at a disadvantage.
A smart structure editor can bypass the parsing problem. It comes at the cost of some fluidity in the authoring process because effectively you would have to say what you are about to place somewhere before placing it. So instead of typing "string" you would have to somehow say "here comes a string", then provide its value.
The problem with this is the fast text-based editing and typing that we are used to becomes difficult and clunky.
Metadata:
This is a big topic. But to give a summary, this gives us a way to have information present that doesn't get in the way.
For example consider an assignment 'name := "John"'. When we are stuck in a flat environment if you want to make that assignment a "const" now you have to turn that into 'const name := "John"'.
In many cases there are lots of attributes and extra information that you would like to attach to a piece of the program.
You don't necessarily want to invent words and keywords and language rules for them. You also don't necessarily want to always see all of them.
If we could easily attach metadata to the pieces of the program it would obviate the need for many language complexities as many things could be turned into metadata key values.
So if you wanted to make a name binding constant you could set "is mutable := no" on that part.
Once you have the ability to associate arbitrary and not arbitrary metadata to any piece of the program it opens up so many opportunities.