Proponents of the command line praise its power, flexibility, and simplicity. But I think command lines need to die in a fire.
Building scripts out of simple processes is good. Arcane one-liners are not. Command-line shells are a nightmare of broken syntax, destructive actions, and rigid but inscrutable design. Unstructured text is bad for interop. Writing scripts is a tedious process of re-running previous commands and piping results to and from temporary files. Often you blow away your work by accident. It all sucks. No one should live like this.
My concept: a "shell" inspired by visual shader editors and other dataflow programming systems. Processes are represented by nodes; data is piped between them by wires. Data is loosely structured, roughly like JSON—enough to make data processing easy.
Principles:
- Interactive by default. There should be a continuum from "just playing around" to "writing a script". It should be possible to just drop in a file, mash it around, and drag it back out, having never written a "script" at any point.
- Intermediate results are tangible. The output of each node is always saved so it can be re-used, or exported as is. You should never have to re-run a previous step while working on subsequent steps, and you should never have to pipe anything to a temp file for development purposes.
- More than just text. Images and other files should be viewable and manipulable.
- Loosely structured data. No one should have to write a parser for some wacko ad-hoc data format. Something like JSON provides the right amount of structure: easy for producers to produce, easy for consumers to consume.