Some people still have the
illusion that
Python is just a "
toy-
language" just because it was designed to be syntactically clear and
easy to learn. Although it might have been true before, I don't feel that today's Python has had to make any
compromises that limit its
power of
expression. Unlike many other modern languages, Python has
garbage collection,
lexical scoping, simple generators,
iterators and several tools for
functional programming such as list comprehensions and
lambda functions. Also, you should not forget
Jython (former
JPython) that allows Python and
Java interoperate seamlessly and produces
Java class files from Python
source.
Beauty is in the eye of the beholder, but for me, Python has the most beautiful syntax I've seen in any programming language. Although many experienced programmers dislike Python's lack of block delimiters, it removes unnecessary clutter from the source code. Using, for example, the C-like {...} brackets makes it easier to write a parser, I claim that the human eye instinctively sees the indentation first and foremost. How many programmers have been bitten by the following piece of code?
if (a < b)
b = 0;
++a;
By making indentation part of the syntax ensures that what you see is always what you get.
It all has a price, though. Especially after the addition of real garbage collector, Python programs run considerably slower than an equivalent program in C or even other interpreted languages such as Perl or Java. For most tasks, however, increased programming productivity makes up for the lack of program efficiency.
What I'm ultimately trying to say is that Python makes an excellent first language for someone who has never programmed before, but at the same time it is a powerful tool for professionals looking for a good generic language.