[Tutor] Are you allowed to shoot camels? [kinda OT]

Smith, Jeff jsmith at medplus.com
Thu Feb 3 23:21:51 CET 2005


Jacob,

As I said I'm well aware of the defense of these peculiarities of Python
but I still disagree with them from a language design choice.  That
doesn't stop me from learning and using and enjoying Python but I feel
that both of them introduce some instability to the langauge.

In only 6 months of programming, I've already seen one case where

if test:
	this
that

Was accidentally coded

if test:
	this
	that

(In fact, I suspect variations on this this may be the reason for the
line spacing suggestions in PEP-8.)

I've also seen several cases where an unbound variable caused an
exception at runtime.

True, these could be caught by extensive unit testing but know the
reality of that happening :-)

Perl and Python both resist the introduction of a switch statement which
I (and many others) feel is the most elegant way to express what it
does.

I also wish Python would take up the C ternary operator which is also
quite clear and elegant.

Of course, there are things I disklike about every other language I've
used.  To paraphrase the famous quote:  There are no good programming
languages, just some that aren't as bad in some situations.

Jeff



-----Original Message-----
From: Jacob S. [mailto:keridee at jayco.net] 
Sent: Thursday, February 03, 2005 4:40 PM
To: Smith, Jeff; Nicholas.Montpetit at deluxe.com; tutor at python.org
Subject: Re: [Tutor] Are you allowed to shoot camels? [kinda OT]


MessageI hate to be a spoiled sport and do exactly what you said to not
do. 
But I present two counter examples
1. The indentation IS the closure on flow statements. Indenting starts a

flow, then removing indentation on next line closes the flow. Again its
all 
about the language. If your English then don't look at Greek words and
not 
want to learn them because you don't understand them.

2. The lack of "use strict semantics" is just one python's ways of using
the 
term "There is more than one way to do it"

Sorry,
Jacob



1. Lack of closure on flow statements.

I've already been bitten by:

if test:
    do this
    do that

where "do that" should have been out-dented.  For a non-Python
programmer, 
this "feature" can lead to some very non-intuitive coding should someone
be 
so perverse as to write it :-)

2. Lack of "use strict" semantics.  I know that pychecker can supposedly
do 
this but I still believe it belongs in the language.

Don't try to defend them.  I've read all the arguments but I just don't 
agree with the design choice.

Jeff

-----Original Message-----
From: Nicholas.Montpetit at deluxe.com
[mailto:Nicholas.Montpetit at deluxe.com]
Sent: Thursday, February 03, 2005 8:43 AM
To: tutor at python.org
Subject: Re: [Tutor] Are you allowed to shoot camels? [kinda OT]



Well, here's my $0.02.

I would recommend caution regarding the trashing of Perl.  One thing
I've 
been very impressed with on this list (and other segments of the Python 
community) is the _fairly_ cordial relationship between the supporters
of 
the two languages.  Contrast that to a lot of PHP literature I've seen, 
which doesn't even acknowledge that Perl exists.  My theory is that many
who 
use PHP got kicked around by trying to learn Perl, and bitterness set
in. 
But that's a digression...  Anyway, I'm on the fence as to whether I
want to 
learn Python (not exactly a "core competency" for statisticians, but I
do 
line the numerical computation capabilities which look _much_ better
than 
those of Perl), and I wouldn't want this negativity to push me (or
others) 
away.

 >...


Nicholas Montpetit
Deluxe Business Services
651-787-1008



_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor 



More information about the Tutor mailing list