Is Python a Zen language?

Discussion in 'Python' started by John Coleman, Feb 25, 2006.

  1. John Coleman

    John Coleman Guest

    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
     
    John Coleman, Feb 25, 2006
    #1
    1. Advertising

  2. John Coleman

    Guest

    don't know but there is "Zen of Python".
     
    , Feb 25, 2006
    #2
    1. Advertising

  3. John Coleman

    Ron Stephens Guest

    Actually, Python has the distinction of being both a great tool
    language *and* a great Zen language. That's what makes Python so cool
    ;-)))

    Ron Stephens
    Python411
    www.awaretek.com/python/index.html
     
    Ron Stephens, Feb 25, 2006
    #3
  4. Mu.
     
    Alex Martelli, Feb 25, 2006
    #4
  5. John Coleman

    John Coleman Guest

    Ron Stephens wrote:
    > Actually, Python has the distinction of being both a great tool
    > language *and* a great Zen language. That's what makes Python so cool
    > ;-)))
    >
    > Ron Stephens
    > Python411
    > www.awaretek.com/python/index.html


    This would explain why the question is so hard to answer. It is a
    slam-dunk that Lisp is Zen and VBA is tool - but python really is a bit
    hard to classify. This is somewhat similar to the way that python seems
    to straddle the gap between imperative and functional languages. It has
    something from each worlds (whether it has the *best* from each world
    is a separate question)

    -John Coleman
     
    John Coleman, Feb 25, 2006
    #5
  6. John Coleman

    Guest

    GEB perhaps?
     
    , Feb 25, 2006
    #6
  7. John Coleman

    Max Erickson Guest

    Given that python code is often described in terms of being 'pythonic' or
    not, and that pythonic is a term that is apparently well agreed upon yet
    seemingly impossible to define for someone who does not already understand
    the word, python is probably a zen language.

    max
     
    Max Erickson, Feb 25, 2006
    #7
  8. John Coleman

    Kent Johnson Guest

    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?


    Expanding on what Alex said :)

    Python is an excellent tool language, it is very pragmatic and powerful
    and makes it (relatively) easy to just get stuff done.

    Python has one of your 'zen' aspects - using Python has definitely
    expanded the way I think about programming. Powerful built-in support
    for lists and dicts, first-class functions and easy introspection enable
    a style of programming that is difficult or impossible in Java and C++.

    But Python is not difficult to pick up - it is notably easy - and I
    don't think anyone claims it leads to computational satori - it's more
    an attitude of "try it, you'll like it!". Using Python does seem to
    spoil people - I for one hate to code in Java now. Maybe "bliss" is a
    better word for it than "satori".

    Kent
     
    Kent Johnson, Feb 25, 2006
    #8
  9. I don't know if python is Zend.
    It's quite minimalistic and it "flows" very well, so I guess it is a...
    "Feng-shui" language?
     
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=, Feb 25, 2006
    #9
  10. John Coleman

    Terry Reedy Guest

    "John Coleman" <> wrote in message
    news:...

    an interesting statement and question.
    ....
    > 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.

    ,,,

    An 'emphasis on the ONE TRUE WAY' would not be pythonic ;-)
    Sorry you got that misimpression.

    For the Zen of Python, type 'import this' at an interactive prompt.
    One of the lines is

    'There should be one-- and preferably only one --obvious way to do it.'

    This is intentionally more nuanced, and practical, than your paraphrase.

    I agree with the 'both' answer.

    Terry Jan Reedy
     
    Terry Reedy, Feb 25, 2006
    #10
  11. John Coleman

    Twig Guest

    What is "zen"?

    Is it something eatible (I'm hungry now)?
     
    Twig, Feb 25, 2006
    #11
  12. John Coleman

    Twig Guest

    Kent Johnson wrote:
    >
    > Expanding on what Alex said :)

    *snip*
    >
    > Python is an excellent tool language, it is very pragmatic and powerful

    *snip*
    >
    > Kent


    "It's a good axe", Muddy waters said about his guitar when asked by some
    heavy-mega guitar hero.

    Python is practical tool for practical problems. But if problem isn't
    practical, it is misdefined.
     
    Twig, Feb 25, 2006
    #12
  13. John Coleman

    Bryan Olson Guest

    John Coleman wrote:
    > 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.


    I think that's a horrible classification. Every language is both.
    "Transform your way of thinking" from what? There is no
    distinguished canonical view of what a programming language looks
    like, from which all others must be strange and wondrous
    transformations.

    Lisp and Forth are not tools for programming a computer? Of course
    they are. Algol and Java don't transform people's thinking about
    programming? Nonsense.


    --
    --Bryan
     
    Bryan Olson, Feb 25, 2006
    #13
  14. John Coleman

    Jorgen Grahn Guest

    On Sat, 25 Feb 2006 18:31:33 GMT, Bryan Olson <> wrote:
    ....
    > I think that's a horrible classification. Every language is both.


    I agree; it's horrible as a classification.

    But it's interesting concepts. One might use them to discuss the design of
    various languages, and how the users treat them -- as long as one doesn't
    get carried away.

    Too bad Larry Wall doesn't post to this group.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
    \X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
     
    Jorgen Grahn, Feb 25, 2006
    #14
  15. John Coleman

    John Coleman Guest

    Bryan Olson wrote:
    > John Coleman wrote:
    > > 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.

    >
    > I think that's a horrible classification. Every language is both.
    > "Transform your way of thinking" from what? There is no
    > distinguished canonical view of what a programming language looks
    > like, from which all others must be strange and wondrous
    > transformations.
    >
    > Lisp and Forth are not tools for programming a computer? Of course
    > they are. Algol and Java don't transform people's thinking about
    > programming? Nonsense.
    >
    >
    > --
    > --Bryan


    You seem to have completly overlooked both the hedge word "rough" in my
    first sentence and the qualifications in my third paragraph. I probably
    was not sufficiently clear that I was describing some fairly sunjective
    impressions. It is a simple observation that devotees of the Scheme
    language view their language as more than *just* a tool for programming
    computers. To quote from the introduction to the first edition of SICP:

    "we want to establish the idea that a computer language is not just a
    way of getting a computer to perform operations but rather that it is a
    novel formal medium for expressing ideas about methodology"
    (http://mitpress.mit.edu/sicp/full-text/book/book.html).
    It is also a simple observation that experts in VBScript *don't* walk
    around talking like that. Scheme and VBScript are of course both Turing
    complete, but they seem to have radically different cultures. Do you
    disagree? Or, if you agree that there is a difference but don't like
    the words "Zen" vs. "tool" to describe it, how would you articulate the
    difference?

    Again, just curious.

    -John Coleman
     
    John Coleman, Feb 25, 2006
    #15
  16. 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
     
    Claudio Grondi, Feb 25, 2006
    #16
  17. John Coleman

    Kay Schluehr Guest

    John Coleman wrote:
    > Ron Stephens wrote:
    > > Actually, Python has the distinction of being both a great tool
    > > language *and* a great Zen language. That's what makes Python so cool
    > > ;-)))
    > >
    > > Ron Stephens
    > > Python411
    > > www.awaretek.com/python/index.html

    >
    > This would explain why the question is so hard to answer. It is a
    > slam-dunk that Lisp is Zen and VBA is tool - but python really is a bit
    > hard to classify. This is somewhat similar to the way that python seems
    > to straddle the gap between imperative and functional languages. It has
    > something from each worlds (whether it has the *best* from each world
    > is a separate question)
    >
    > -John Coleman


    There is something that worries me about Lisp. If you are interested in
    the history of Lisp and some non-technical aspects of its culture I can
    recommend the writings of Richard Gabriel, who was one of the leaders
    of the CL standardisation commitee and founder of the Lisp company
    Lucid in the mid 80s that gone down a few years later. As it turned out
    that time Lisp was not capable to survive in what we call today a
    "heterogenous environment". It was strongly too self-centered. So I
    would actually invert you categories and say that a good tool achieves
    to have a non-dual nature instead of a strong I. With Lisp you might be
    a god but according to the Zen philosophy a god is a subordinated
    character that preserves the illusion of self-identity. A fine thing
    about a tool in this context is that you have to define its identity by
    a relationship to something that it is not.

    I have at times the impression that many people who talk about Zen
    philosophy confuse it with some home brewn mixture of platonism with
    its transgressive move towards the true reality, a stoic hedonism of
    contemplation and the taoistic being-in-doing. Zen on the other side is
    more radical: if you erase yourself there is no-one "who" is in the
    flow but chances are that you and the computer over there are the same
    thing.

    Kay
     
    Kay Schluehr, Feb 25, 2006
    #17
  18. John Coleman

    Paul Rubin Guest

    "Kay Schluehr" <> writes:
    > I have at times the impression that many people who talk about Zen
    > philosophy confuse it with some home brewn mixture of platonism with
    > its transgressive move towards the true reality, a stoic hedonism of
    > contemplation and the taoistic being-in-doing. Zen on the other side is
    > more radical: if you erase yourself there is no-one "who" is in the
    > flow but chances are that you and the computer over there are the same
    > thing.


    QOTW or something.
     
    Paul Rubin, Feb 25, 2006
    #18
  19. John Coleman

    none Guest

    John Coleman wrote:
    > Bryan Olson wrote:
    >
    >>John Coleman wrote:
    >>
    >>> 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.

    >>
    >>I think that's a horrible classification. Every language is both.
    >>"Transform your way of thinking" from what? There is no
    >>distinguished canonical view of what a programming language looks
    >>like, from which all others must be strange and wondrous
    >>transformations.
    >>
    >>Lisp and Forth are not tools for programming a computer? Of course
    >>they are. Algol and Java don't transform people's thinking about
    >>programming? Nonsense.
    >>
    >>
    >>--
    >>--Bryan

    >
    >
    > You seem to have completly overlooked both the hedge word "rough" in my
    > first sentence and the qualifications in my third paragraph. I probably
    > was not sufficiently clear that I was describing some fairly sunjective
    > impressions. It is a simple observation that devotees of the Scheme
    > language view their language as more than *just* a tool for programming
    > computers. To quote from the introduction to the first edition of SICP:
    >
    > "we want to establish the idea that a computer language is not just a
    > way of getting a computer to perform operations but rather that it is a
    > novel formal medium for expressing ideas about methodology"
    > (http://mitpress.mit.edu/sicp/full-text/book/book.html).
    > It is also a simple observation that experts in VBScript *don't* walk
    > around talking like that. Scheme and VBScript are of course both Turing
    > complete, but they seem to have radically different cultures. Do you
    > disagree? Or, if you agree that there is a difference but don't like
    > the words "Zen" vs. "tool" to describe it, how would you articulate the
    > difference?
    >
    > Again, just curious.


    It's a metter of perspective. Python didn't change my thinking about
    programming. Smalltalk changed my way of thinking about programming
    very radically. All Python changed my thinking about was how to better
    program in Python. Python to me just happened to be a very pragmmatic
    and productive tool for getting the job done. It happens to be
    comfrotable because large parts of it already fit into my way of
    thinking from long use in Smalltalk, but my description of Pythong would
    be 'cleanly practical' not 'zen'
     
    none, Feb 26, 2006
    #19
  20. On Sat, 25 Feb 2006 06:09:16 -0800, 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?


    Why can't it be both? Why do you think "Zen" and "tool" are two different
    *kinds* of language, rather than just two extremes of a single continuum?

    There are two kinds of people: those who divide the world into false
    dichotomies, and those who don't. *wink*


    > 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.


    Regardless of whether Python is a Zen or tool language, or both, or
    something else, it is incredibly easy to pick up. Just remember, and this
    goes for *any* new language you are trying to learn, Python is not
    C/Java/VB/Fortran/Lisp/Ada/whatever language you already know.



    --
    Steven.
     
    Steven D'Aprano, Feb 26, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Henshaw

    Making the Zen of Python more useful

    Andrew Henshaw, Apr 2, 2004, in forum: Python
    Replies:
    10
    Views:
    537
    Andrei
    Apr 2, 2004
  2. Dave
    Replies:
    4
    Views:
    347
    Peter Hansen
    Apr 3, 2004
  3. Li Daobing
    Replies:
    2
    Views:
    2,940
    Skip Montanaro
    May 19, 2004
  4. Tim Peters
    Replies:
    1
    Views:
    417
    Steve Williams
    May 20, 2004
  5. Mark Jackson
    Replies:
    2
    Views:
    299
    Mark Jackson
    Jun 4, 2004
Loading...

Share This Page