4 ms·
The UNIX philosophy is redundant. The only unique part of it is to use text for everything, which isn't a very good piece of advice. It only exists to cover fo
by James_K 4y ago
The UNIX philosophy is redundant. The only unique part of it is to use text for everything, which isn't a very good piece of advice.
It only exists to cover for the mistakes of UNIX. The bulk of it is saying that you should apply the same design principals you would on the inside of a program to the external interface of it. The irony here is that people only treat these situations differently because UNIX forces programs to interact through limited means (a single function which accepts an array of strings as its arguments). If UNIX allowed programs to represent themselves as modules of functions which act on datastructures richer than a string, it would be obvious to everyone that they should apply good programming principals to these modules.
Case in point: Emacs. Its programs are modular, so it needs no grand philosophy telling programmers to apply the well known practices of good design. The `find' utility is the exact sort of thing that the UNIX philosophy warns against. It contains huge amounts of duplicate functionality; I believe the version installed on my system takes more than a hundred flags. No such functions exist in Emacs, because it would never occur to someone that they should write a function with over a hundred keyword arguments to do something as basic as file handling.
The advice in the UNIX philosophy exists only to combat the issues that UNIX creates, which is why I am so confused by the fact that so many people are reverent to it. They act as though UNIX invented simplicity or good design, as though the application thereof is something special rather than what should be the default for any competent programmer. I can only speculate why this happens. My personal view is that UNIX has locked us into systems that don't follow its own philosophy. People come to view this failure as the default, so any instance of good design is remarkable.