Why Python?

Martijn Faassen m.faassen at vet.uu.nl
Wed Sep 4 06:15:27 EDT 2002


Benjamin <phncontact.libero.it@> wrote:
> I just begun to learn how to program. And I choosed Python for
> doing that. surfing around the web i found an article about this
> language, they said it's the ideal language for beginners to the
> world of programming. and i admit it, the syntax is very clear making
> the code very readable, i learn easily the concepts of programming
> and i soon wrote some nice programs. but since i finished my
> newbie-tutorial, i am wondering about one question: is it worth to go
> deeper into python? i talked to a friend of mine, he told me that i
> should try php..
> what should i do?? ^_^ in other words: what is python good for?
> why should i continue with python?

Python's good for everything! Well, perhaps not everything, but it's
a general programming language and it can take quite a while until you
run into its limitations. And every language has its own limitations
and advantages.

Python's main limitation in my mind is that it is relatively
slow compared to code written in C, say. However, don't let that scare
you away -- it's fast enough for many purposes, there's a lot that you
can do to improve performance without leaving Python, and performance
is a subtle issue; as Python is a higher level language sometimes it is
easier to write a performing but more complicated algorithm in
Python, compared to a lot of time and struggle in C. Don't worry too
much about performance when you're starting out.
Besides, if you compare to PHP I would think Python wouldn't do so
badly performancewise anyway.

I wouldn't recommend learning PHP at this stage; from what I've seen and
heard about it is it not very good at showing beginning programmers
how to code cleanly -- Python is a lot better at that (though there are
certainly other languages that would help there as well). PHP might
obscure the concepts from you or expose you to bad practices. Then again,
it might help to deliver quick results and thus stimulate you to
program more, so I don't imagine it would do a lot of harm either as long
as you stay aware of good programming practices.

PHP was developed to create dynamic web pages on the server side, and
grew from that. People still mostly use it to create web applications.
It is certainly possible to write web applications with Python; I do
that for a living using Zope (http://www.zope.org). Here's a page
describing a whole range of options if you want to do web programming
with Python:

http://www.python.org/topics/web/

But Python can be used for many other purposes besides web programming. 
It depends entirely on what you want to do. Best way to learn is to set
yourself a goal that's not too ambitious and try implementing it.
Even if you fail you'll have learned new things.
 
Regards,

Martijn 
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list