Python for everything?

Tom Anderson twic at urchin.earth.li
Fri Jul 1 08:28:08 EDT 2005


On Thu, 30 Jun 2005 xeys_00 at yahoo.com wrote:

> can Python "do it all"?

More or less. There are two places where python falls down, IMHO. One is 
performance: python isn't generally as fast as C or Java, even with Psyco. 
However, the number of cases where performance - and absolute 
straight-line performance of the code - actually matters is much smaller 
than you might think. Also, you can incorporate C into python pretty 
easily. The other is in bit-twiddling - anything that involves mucking 
about with data at the level of bits and bytes. Maybe this is just blind 
prejudice, but i'm never as comfortable hacking on that sort of stuff 
(writing a Huffman coder, say) in python as in java.

Other than that, python is pure victory.

> I am wondering what to learn as my scripting language.

Python.

> I have read that perl is good up to about 250 lines, and after that it 
> gets kind of hairy.

That's putting it mildly.

> I would like opinions as to the suitability of Python as a general 
> purpose language for programming unix, everything from short scripts to 
> muds.

Python is, all things considered, definitely the best such language.

There are strong arguments that can be made in favour of younger cousins 
of Python such as Ruby and Lua, but none of those have anything like the 
userbase or third-party code that Python does, and that counts for a lot. 
LISP (or rather Scheme) would be a more unusual option; it's a language 
that most people hate, but that people who really take the time to learn 
it love with a fervour bordering on scary.

tom

-- 
In-jokes for out-casts



More information about the Python-list mailing list