Is python not good enough?

Jonathan Hartley tartley at tartley.com
Wed Jan 13 04:33:06 EST 2010


On Jan 13, 9:06 am, ta... at mongo.net (tanix) wrote:
> Well, as soon as they restore the braces to identify the code
> blocks and provide the functionality of advanced statically
> type languages, such as threads, async processing, all synchronization
> primitives, garbage collection, events and GUI, i'd be willing
> to switch to Python. Some of it is already there. But not all.
>
> Except, before doing it, I'd like to know what Python buys me
> compared to say Java.


Hey tanis.

The absence of braces from Python is a thoughtful, deliberate choice.
There are good reasons for it, and many people (especially people
round these parts) think Python is better without braces. If you don't
like it then fair enough, your preferences are your own to choose.

Other than that, Python does have every single one of the things you
enumerate.

Regarding static versus dynamic typing - many people (especially
people round these parts) believe dynamic typing to be superior to
static typing in many situations. Again, personal taste seems to weigh
heavily in this topic, but there are strong reasons to prefer dynamic
typing - it allows you to write some programs that simply couldn't be
written statically, and this greater flexibility sometimes allows you
to choose algorithms and code organisation that is a better match for
your problem than a statically typed language would, making your
programs easier to write, shorter, and simpler to read.

As for a direct comparison with Java, then perhaps the most prominent
differences are that Python generally produces shorter, simpler-
looking programs, which are easier to write and read. Dynamic typing
is an advantage of Python in most situations. On the other hand,
Python often has poorer performance than Java. My personal hypothesis
is that this performance mismatch is most pronounced in small,
benchmark-like data churning inner-loops, and becomes less significant
for most real-world programs that have high complexity, since Python's
power-through-simplicity allows developers to visualise better
algorithms and refactor more easily than would otherwise be the case.

Best regards,

  Jonathan



More information about the Python-list mailing list