Currently, we write programs by typing text into files, and running a compiler over those files to interpret the text we typed. This seems like it should be a historical accident.
A programming language is structured. Writing invalid code is rejected by the compiler. However, text files are inherently unstructured. Structure has to be imposed on the text file by external tools – compilers, IDEs, etc.
Why not represent programs as databases of statements/functions/etc? This would lead to a ton of benefits. For one, invalid programs would be impossible. This saves a huge amount of time where programmers currently fix typos in code, saves resources where compilers/static analysis tools read those files to find errors, etc.
It seems like we’re approaching the problem from the wrong angle. Right now, we write down a program in an unstructured format, and build tools to see if the thing we wrote down is valid. Instead of all of that, we should just write the programs in a structured format (read: database/something else which isn’t a text file) in the first place. This is akin to writing a bunch of instructions in a Word document, then writing tools to parse that Word document and produce a program, rather than just designing a program which lets you directly generate programs.