php vs python

Arnaud Delobelle arnodel at googlemail.com
Mon Jun 2 00:36:02 EDT 2008


"Joel Koltner" <zapwireDASHgroups at yahoo.com> writes:

> There's potentially a large difference between a "good" speaker of 
> English/German/etc. vs. "eloquent."
>
> I'd tend to agree with Jerry that if you can write "good" code in
> one language, you can in pretty much any other as well... but that
> doesn't imply you're necessarily "eloquent" in any languages. :-)
> Eloquence is nice, but eradicating "bad" code in this world is about
> a million times more important than attempting to move people from
> "good" code to "eloquent" code.

This is wrong, because if you know well one language only, you tend to
think that the principles that underpin it are universal.  So you will
try to shoehorn these principles into any other language you use.

It's only when you have become reasonably proficient in a number of
conceptually different languages that you start to build a picture of
what "a programming language" is.

I understand that there are some sane practices that are useful to
know when programming in any language, but it is wrong to say that the
skill of programming can be reduced to that, the rest being syntax.
There is (hopefully!) a design behind the syntax, you have to
understand it to use the language well.

You may be great at building Turing machines.  That doesn't make you a
master of crafting lambda-expressions.

> To be Pythonic here, "eloquent" code would perhaps often have clear,
> clean list comprehensions used when "good" code would use a "for"
> loop but still be easy to follow as well and perfectly acceptable in
> the vast majority of cases.

I find that eloquent Python speakers often tend to write a for loop
when mere good ones will try to stick a list comprehension in!

Regards

-- 
Arnaud



More information about the Python-list mailing list