This commit is contained in:
Miloslav Ciz 2024-08-08 22:37:16 +02:00
parent 8dbbd1acb0
commit 367af6e637
22 changed files with 1863 additions and 1829 deletions

View file

@ -4,7 +4,7 @@ Unix philosophy is one of the most important and essential approaches to [progra
NOTE: see also *[everything is a file](everything_is_a_file.md)*, another famous design principle of Unix -- this one is rather seen as a Unix-specific design choice rather than part of the general Unix philosophy itself, but it helps paint the whole picture.
As written in the [GNU](gnu.md) coreutils introduction, a Swiss army knife (universal tool that does many things at once) can be useful, but it's not a good tool for experts at work, they note that a professional carpenter will rather use a set of relatively simple, highly specialized tools, each of which is extremely efficient at its job. Unix philosophy brings this observation over to the world of expert programmers.
As written in the [GNU](gnu.md) coreutils introduction, a Swiss army knife (universal tool that does many things at once) can be useful, but it's not a good tool for experts at work, they note that a professional carpenter will rather use a set of relatively simple, highly specialized tools, each of which is extremely efficient at its job. Unix philosophy brings this observation over to the world of expert programmers. The same analogy is made in book *Starting Forth* about the [Forth](forth.md) programming language that in this sense follows Unix philosophy as well -- while typical programming languages such as [C++](cpp.md) or [Java](java.md) offer a few highly complex, [hardcoded](hardcoded.md), Swiss army knife style constructs (such as [objects](oop.md), [templates](template.md), macros and so on), Forth is built on top of many extremely simple definitions of different *words* out of which the language is built (including such things as control structures or declaring variables for example) AND is left to be further extended by the programmer himself.
In 1978 [Douglas McIlroy](mcilroy.md) has written a short overview of the Unix system (*UNIX Time-Sharing System*) in which he gives the main points of the system's style; this can be seen as a summary of the Unix philosophy (the following is paraphrased):