Python's "only one way to do it" philosophy isn't good?

Antoon Pardon apardon at forel.vub.ac.be
Mon Jun 11 06:34:58 EDT 2007


On 2007-06-09, Terry Reedy <tjreedy at udel.edu> wrote:
>
> "WaterWalk" <toolmaster at 163.com> wrote in message 
> news:1181368143.874341.273140 at r19g2000prf.googlegroups.com...
>| I've just read an article "Building Robust System" by Gerald Jay
>| Sussman. The article is here:
>| 
> http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf
>|
>| In it there is a footprint which says:
>| "Indeed, one often hears arguments against building exibility into an
>| engineered sys-
>| tem. For example, in the philosophy of the computer language Python it
>| is claimed:
>
> For him to imply that Python is anti-flexibility is wrong.  Very wrong.. 
> He should look in a mirror.  See below.

My impression is that python supporters often enough show
some anti-flexibility attitude.

>| \There should be one|and preferably only one|obvious way to do
>| it."[25] Science does
>| not usually proceed this way: In classical mechanics, for example, one
>| can construct equa-
>| tions of motion using Newtonian vectoral mechanics, or using a
>| Lagrangian or Hamiltonian
>| variational formulation.[30] In the cases where all three approaches
>| are applicable they are
>| equivalent, but each has its advantages in particular contexts."
>
> And in those contexts, one would hope that the method with advantages is 
> somehow the obvious way to do it.  Otherwise beginners might become like 
> Buriden's ass.
>
> So I dispute that science is as different as he claims.  And I do not see 
> any real value in the statement in that I do not see it saying anything 
> useful to the reader, at least not in this snippet.

Yes science is different. The difference is the following. Should
science only know the Newtonian vectoral mechanics and someone
would come up with the Lagrangian approach, nobody would protest
against this new approach by remarking that there should only be
one obvious approach, implying that by introducing the second approach
you give the people a choice, which they will have to think about
so their decision what to use is no longer obvious, which it is
if there is only one option.

Yet these kind of remarks are made often enough when someone suggest a
change to python.

-- 
Antoon Pardon



More information about the Python-list mailing list