The Great Tao of Perlby vilk (Beadle)
|on Jul 02, 2001 at 09:52 UTC||Need Help??|
A bit of philosophy for us monks. Numbers in parentheses indicate the appropriate passage of the Tao Te Ching.
Ancient Chinese life philosophy and modern computer science obviously have little to absolutely nothing to do with each other, right? Wrong. As to which the name of this very website alone attests, the spiritual pursuits of Eastern religious orders can be applied, with a dash of imagination and creativity, to our favorite language: Perl.
Does Perl have Tao? Mysterious Te? These are questions more appropriately suited to the natural world and its inhabitants, but there is no reason why they cannot be asked of the glue of Unix. I, as both a Taoist and a computer scientist, think that, yes, Perl has Tao in the same way that the flow of water around stones has great Tao. It merely involves some abstraction.
As I just mentioned, the flow of water around stones has great Tao. Why? Because this is the lowest state; water does not contend, it "settles in places everyone else avoids." (8) Tao is all about being in harmony by being as nature and the universe: low, soft, uncut, still, feminine. This is not a node about Taoism itself, so I shall not explain the rudimentaries, but instead urge anyone who has not already done so to pick up a copy of the Tao Te Ching.
"Achieve successes, win the fame, remove yourself: Heaven's Way." (9)
To best distinguish yourself in public performance, do the job well and do not capitalize on your success. It is best to move on and let your work speak for you. This is doubly true in the field of computer science, where a programming language must be judged on its usefulness and applicativity. Java, a language highly touted by Sun and other vendors for its portability and object-orientedness, had a very high-profile birth and active, aggressive marketing. This is not Tao. Anyone who sits down and uses Java will discover that the advertising is true, but the syntax can be frustrating and cumbersome, and the plethora of classes overwhelming. Perl, in a much different manner, is a language that runs through all of the Internet yet is rarely mentioned. System administrators utilize it constantly, yet computer science courses in universities, as experience has shown, never say specifically say that a Unix system cannot be run without Perl. It is a language that traveled by word of mouth. The very first Perl advocate I ever met did not spend an hour explaining in excited detail all the features and what makes it superior, but instead showed me to the man pages. This common thread of learning Perl not by its propounded merits but by regular, real-world application demonstrates its Tao. By lying still and letting its users come to it shows greatness.
"Everyone in the world says of me: 'great -- but does not seem normal.' It's just 'greatness' -- that's why it does not seem normal. If I were normal, I'd have been of little worth for a long time now." (67)
What other language has such functions as bless and tie? The very nature of the language alludes to Tao. How many languages in active use are explicitly derived from other languages? C++ is a derivative of C, which is in turn a derivative of B. Java's syntax is quite obviously derivative of both C and C++, while Visual BASIC is derivative of innumberable versions of BASIC that came before. Must all popular languages be derived from C or BASIC? It is because Perl is so original that it is great. It is because it is so different that it is so useful. If Perl were C, why is C not used for sundry tasks like managing quotas or parsing files? Larry Wall chose to take Perl in a different direction than its contemporaries, choosing a linguistically diverse and strange vocabulary to create powerful, robust, and, above all, useful functions, syntax, and variables that make Perl what it is today. Indeed, if it were so much like C, would it be used so much? This greatness, imbued in the very nature of the language, has much Tao.
"Who can have an abundance to offer the world? Only the one who has Tao." (77)
Finally, let us look at what has been described as the "Swiss Army Chainsaw." The Yang-Tze is king of the rivers because it has a hundred streams that all reach the ocean. Perl is great because it has many possible ways to solve the same task. There is no specific right way to do anything; There's Always More Than One Way To Do It. Consider the replies to the questions of Seekers of Perl Wisdom. Each question yields multiple answers, each that work and make sense. Perl has an abundance, a wealth, of capability to provide to anyone who is but willing to learn its use. By using Perl, a programmer can focus less on actively achieving the result and rest easy that the job is done well. With Perl, you can "leave 'that' aside and attend to 'this'." (12) In its unlimited usefulness, Perl has allowed us to spend less time attending to the code itself and more time attending to the administration of the system, or the website, or whatever your project may be.
Hopefully, the next time you are easily, cleanly, and efficiently solving a task with but a few lines, remember what I have written: Perl has Tao, and it is the nature of the work of Larry Wall and so many others that makes this language so great. In its abundance, we find greatness. In its humility, we bask in glory. In its differences, we enjoy its functionality.