문제

The UNIX Programming Environment (the classic text) states that the UNIX approach to programming is to build small, well-defined tools that can be combined to solve more complex problems. In learning C and the Bash shell, I've found this to be a powerful concept that can be used to deal with a wide range of programming problems.

Just using a Linux platform, the concept is pretty clear and used all the time. Any expression formed on the command line that redirects I/O, linking system tools like ls, grep, more, and so on shows how powerful this concept is.

The thing that confuses me is that many of these programs are written in C, using an imperative/procedural programming style, yet the way they are used and joined together on the command line seems much more like functional programming to me, where each program is an isolated function that doesn't depend on the state of any other program it might be joined to.

Is this accurate, understanding the UNIX programming philosophy is basically functional programming using tools that may have been built using an imperative programming style?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top