John Coleman wrote: > Greetings, > I have a rough classification of languages into 2 classes: Zen > languages and tool languages. A tool language is a language that is, > well, a *tool* for programming a computer. C is the prototypical tool > language. Most languages in the Algol family are tool languages. Visual > Basic and Java are also tool languages. On the other hand, a Zen > language is a language which is purported to transform your way of > thinking about programming. Lisp, Scheme, Forth, Smalltalk and (maybe) > C++ are Zen languages. Disciples acknowledge that it is difficult to > pick up these languages but claim that, if you persevere, you sooner or > later reach a state of computational satori in which it all makes > sense. Interestingly enough, these languages often have books which > approach scriptural status e.g. SICP for Scheme. > > So (assuming my classification makes sense) which is Python? The > emphasis on simplicity and the beginner-friendly nature of it seems to > put it in the tool category. On the other hand, the emphasis on the ONE > TRUE WAY to accomplish most tasks and the tendency for participants in > this newsgroup to criticize one another's code as being "unpythonic" > seems to move it towards the Zen category. Of course, even tool > languages have their idioms which the novice needs to pick up, so maybe > this isn't decisive, but I detect an element of zeal in this newsgroup > that I don't detect in (say) Excel VBA programming newsgroups. > > No value judgement is intended by my classification. There is no > denying that Zen languages are often very powerful tools (for those who > have reached satori) and that there is a Zen to really mastering, say, > C. Personally, I have never been able to master any Zen language but > can pick up tool languages fairly quickly, so I prefer tool languages. > This is probably because I am not a programmer (I'm a mathematician who > likes to program as a hobby and for numerical simulations) and so don't > have the time to invest in picking up a Zen language. Hard-core hackers > might presumably lean towards the Zen languages. > > Just curious > > -John Coleman > I was lately involved in some very long threads trying to answer the question what a simple assignment operator does and what is behind a Python identifier (variable).
In the context of the above mentioned experience I agree with the notion, that from the beginner point of view, as long as there is no need to get deep understanding what goes on behind the scenes, Python is a tool. At that moment, when it becomes necessary to optimize the code for speed and understand the exact details of what is going on behind the scenes Python turns into a mystery which needs time, effort and ability to grasp new concepts in order to gain control over it, i.e. Python reveals its Zen character. In this context it appears to me worth to mention, that in my eyes a 'pythonic' way of programming has not necessarily something to do with the Python language itself. Even if it is sure better to use Python for 'pythonic' way of programming, it can also be done using any other programming language. I assume, that many of todays advanced Python users were already aware of the 'pythonic' way of programming long before they started to use Python. In Python they found many of the tools they have developed for themselves over the time already built-in and even some more, so they embraced it as programming language of their choice and coined the way it helps to code ideas as 'pythonic' way of programming. This is in my eyes the reason why 'pythonic' way of programming can usually be fully understood only by very experienced programmer who already went all the stages through many other programming languages to Python and use it where it is appropriate being at the same time aware, that there are purposes for which Python is not the way to go and being aware which problems other programming languages have were solved by the design of the Python language. So 'pythonic' way of programming has only a meaning for an _experienced programmer_ as intuitively easy to understand and in different context easy to reuse way of programming where the initial idea must not be bended to fit into the programming language, but where the programming language provides by own design some aid in expressing it. I don't see how Microsoft Visual Basic fits into the category of tool languages. As MS-DOS Quick Basic surely do, Visual Basic/Visual C++ need a total new understanding of programming and belong due to the very hard to grasp event driven way not allowing any workaround it to the category of Zen languages. There is the 'hidden' event handling and the way from the GUI to the code and not other way what makes Visual Basic in my eyes a Zen language where Basic, Algol, Fortran, C are tools. If it makes sense to speak about tool and Zen languages at all, I will draw the line between the two categories depending on the amount of from the programmer hidden amount of code added to his own code in order to make the program run. Assembler, as it runs entirely as it is written is sure a tool. C/C++ is also a tool, as long as it does not extensively use large libraries providing special functionality. Usage of for example C++ build upon the MFC library (Microsoft Foundation Class) makes in my eyes C++/MFC a kind of Zen language out of a C++ tool. Forth belongs according to this definition to the category of Zen languages not because it is so different, but, because you have to track in own mind, that behind the scenes the next command will use what was put on the stack before, what makes part of the processing done 'hidden' behind the scenes. From the experience of the in another thread currently going on hot discussion about Python and Lisp I draw the conclusion, that it is from todays point of view not easy to draw exact lines between the categories like tool/Zen, interpreted/compiled language. In between even making a difference between software/hardware appears to me problematic. Claudio -- http://mail.python.org/mailman/listinfo/python-list