Python or PHP?

John Bokma postmaster at castleamber.com
Sat Apr 23 18:37:06 EDT 2005


Mike Meyer wrote:

> "Simon John" <simoninusa2001 at yahoo.co.uk> writes:
> 
>> I still love Perl, it's a bit of an art form, as "there's more than
>> one way to do it", whereas Python usually only allows one way to do
>> it, which may or may not be a better mantra....
> 
> The Python mantra leads to 1) less programmer overhead, and 2) faster
> improvements in the language.
> 
> To be a Perl expert, you have to know which of the many ways to do
> various things is the fasted under what conditions.

Why?

> Python programmers
> seldom have to worry about that - there's usually only one [obvious]
> way to do things, so you just do it that way.

I doubt that :-D. I have never seen a programming language that forced
me in such a way :-D. 

> Having only one obvious way

I doubt that too ;-)

> to do things means developers only have to
> worry about impact on that way when making improvements, which will
> speed them up.

Yeah, Perl programmers are extremely slow ;-)

> The problem these days is that there are now multiple ways to do a
> variety of things, because we have the "new, pythonic" way and the
> "old, backwards-compatible way". So it's no longer clear which is the
> fastest -

In most cases, why worry? If speed is an issue you should probably have
picked a different programming language in the first place (for that
part of the code). 

> and in the case of generators versus list comprehensions,
> it's not clear which you should be using. To bad.

Use the one that is the easiest to read and understand by yourself.
That's how I program Perl, and that's how I am going to program Python. 

An overloaded toolbox doesn't mean that if you have to hang a painting
on the wall that you have to think for 6 hours which tool you should
use. You just take the one that does the job in a way you feel
comfortable with. I know that the Perl mantra is often misunderstood,
but in my experience only by people who have very little experience with
the language. 

-- 
John                               MexIT: http://johnbokma.com/mexit/
                           personal page:       http://johnbokma.com/
        Experienced programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html



More information about the Python-list mailing list