github.com/elves/elvish@v0.15.0/website/learn/philosophy.md (about) 1 <!-- toc --> 2 3 The development of Elvish is driven by a set of ideas, a **design philosophy**. 4 5 # The language 6 7 - Elvish should be a real, expressive programming language. 8 9 Shells are often considered domain-specific languages (DSL), but Elvish does 10 not restrict itself to this notion. It embraces such concepts as namespaces, 11 first-class functions and exceptions. Whatever you may find in a modern 12 general-purpose programming language is likely to be found in Elvish. 13 14 Elvish is not alone in this respect. There are multiple ongoing efforts; 15 [this page](https://github.com/oilshell/oil/wiki/ExternalResources) on the 16 wiki of oilshell (which is one of the efforts) is a good reference. 17 18 - Elvish should try to preserve and extend traditional shell programming 19 techniques, as long as they don't conflict with the previous tenet. Some 20 examples are: 21 22 - Barewords are simply strings. 23 24 - Prefix notation dominates, like Lisp. For example, arithmetic is done 25 like `+ 10 (/ 105 5)`. 26 27 - Pipeline is the main tool for function composition. To make pipelines 28 suitable for complex data manipulation, Elvish extends them to be able 29 to carry structured data (as opposed to just bytes). 30 31 - Output capture is the auxiliary tool for function composition. Elvish 32 functions may write structured data directly to the output, and 33 capturing the output yields the same structured data. 34 35 # The user interface 36 37 - The user interface should be usable without any customizations. It should be 38 simple and consistent by default: 39 40 - Prefer to extend well-known functionalities in other shell to inventing 41 brand new ones. For instance, in Elvish Ctrl-R summons the "history 42 listing" for searching history, akin to how Ctrl-R works in bash, but 43 more powerful. 44 45 - When a useful feature has no prior art in other shells, borrow from 46 other programs. For instance, the 47 [navigation mode](../learn/cookbook.html#navigation-mode), summoned by 48 Ctrl-N, mimics [Ranger](http://ranger.nongnu.org); while the "location 49 mode" used for quickly changing location, mimics location bars in GUI 50 browsers (and is summoned by the same key combination Ctrl-L). 51 52 - Customizability should be achieved via progammability, not an enormous 53 inventory of options that interact with each other in obscure ways.